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

"ranger" and "oob" error.... #320

Closed
coforfe opened this issue Nov 12, 2015 · 2 comments
Closed

"ranger" and "oob" error.... #320

coforfe opened this issue Nov 12, 2015 · 2 comments

Comments

@coforfe
Copy link

@coforfe coforfe commented Nov 12, 2015

Hello,
I am getting this error with caret/ranger (it's the same error I get on my data.frame).
A reproducible example:

bootControl <- trainControl(method='oob',number=5, verboseIter=TRUE)
rfGrid <- expand.grid(.mtry=2)

modFitrf <- train(

  • Species ~ .,
  • data = iris,
  • trControl = bootControl,
  • tuneGrid = rfGrid,
  • method = "ranger",
  • num.trees = 500,
  • importance = 'impurity',
  • verbose = TRUE,
  • classification = TRUE
  • )
  • : mtry=2
    Error in { : task 1 failed - "all arguments must have the same length"
  • I am using caret version: 6.0-58
  • And ranger version: 0.2.7
    ** (I got initially the error on the new version of ranger: 0.3.0 that appeared yesterday, but I removed and installed the old one that worked fine before but not now).
  • The same error appears when I remove "number=5" in trainControl().

I have run this kind of configuration (for trainControl() and for train()) since ranger appeared in caret in this new version (6.0.58). It worked flawlessly very fast and without any problem on my data.frame (60,000x35), but today I have run it again on the same data.frame that I run before and it gets that same error.

The only change to my knowledge is the version of RStudio. Version for e1071 which rangers depends, it is the same since August.

Kind Regards,
Carlos.

topepo added a commit that referenced this issue Jan 1, 2016
@topepo
Copy link
Owner

@topepo topepo commented Jan 1, 2016

This was related to changes to ranger. I've made a change that should be more robust.

@topepo topepo closed this Jan 1, 2016
@coforfe
Copy link
Author

@coforfe coforfe commented Jan 2, 2016

Thanks a lot!

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.