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

method "bag" in caret: all the RMSE metric values are missing: #19

Open
tobigithub opened this issue Dec 25, 2015 · 0 comments
Open

method "bag" in caret: all the RMSE metric values are missing: #19

tobigithub opened this issue Dec 25, 2015 · 0 comments

Comments

@tobigithub
Copy link
Owner

Calling method bag without bagcontrol results in numerous errors, better would be to have a standard bagcontrol so the function train(x, y, method = "bag") could be called in a similar way like the working function train(x, y, method = "knn")

> test_reg_none_model <- train(x, y, method = "bag")
Something is wrong; all the RMSE metric values are missing:
      RMSE        Rsquared  
 Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA  
 NA's   :1     NA's   :1    
Error in train.default(x, y, method = "bag") : Stopping
In addition: There were 26 warnings (use warnings() to see them)

Solution:
This does not work with a standard call train(x,y, "bag") , it requires bagControl parameters.

set.seed(123)
test_reg_none_model <- train(x, y, method = "bag", 
                             bagControl = bagControl(fit = ctreeBag$fit,
                                                     predict = ctreeBag$pred,
                                                     aggregate = ctreeBag$aggregate))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant