Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a check such that grow_tree() can handle duplicate data. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreasostling
Copy link
Collaborator

It is quite frequent that the hitters dataset can have the same value on some variables for multiple people.

It is quite frequent that the hitters dataset can have the same value on some variables for multiple people.
@MansMeg
Copy link
Owner

MansMeg commented Nov 15, 2023

I don't get this. Do you know if this is a bug? I tried my function without, and it did work (see the teacher repo).

@andreasostling
Copy link
Collaborator Author

I don't remember exactly but this is what I wrote from last year:

Add:
&& nrow(unique(X[S_m[[1]],]))>1
here to make sure there are at least 2 unique data points?

even this is not enough..

given l=5:
10 rows with 9 being identical would return a split with (9,1), 1<5 is a problem but will at least not break the predict_with_tree() function.

I think there was some issue with predict_with_tree() getting stuck in an infinite loop or something like that.

@MansMeg
Copy link
Owner

MansMeg commented Nov 16, 2023

Ok. I merge your other PR. Lets see if that is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants