-
Notifications
You must be signed in to change notification settings - Fork 18
Forward extra arguments to caret::train()
#304
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
Conversation
run_ml()
& train_model()
to forward extra arguments to caret::train()
caret::train()
Codecov ReportBase: 98.09% // Head: 98.09% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 13 13
Lines 995 999 +4
=======================================
+ Hits 976 980 +4
Misses 19 19
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
run_ml()
now forwards extra arguments (...
) totrain_model()
, which then forwards them tocaret::train()
. This allows our users to take advantage of specialty arguments used by specific model engines such asntree
forrf
andweights
forglmnet
(among other models that accept case weights), even when we haven't explicitly defined them inrun_ml()
.To implement this, I had to switch from formula notation to x,y notation. We had wanted to do that anyway to prevent #156. However, formula notation is still used for support vector machines to circumvent a problem in
kernlab
(see this comment in caret iss #809).Issues
Change(s) made
...
) tocaret::train()
.ntree
argument fromrun_ml()
andtrain_model()
, since that is now captured by...
.weights
argument is used when given forglmnet
.train_model()
.caret::train()
for svm models.caret::train()
for all others.Checklist
(
Strikethroughany points that are not applicable.)ntree
is not one of the named arguments inrun_ml()
but can still be defined and used forrf
.NEWS.md
if this includes any user-facing changes.