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

Correct Way of Using update.train? #445

Closed
terrytangyuan opened this issue Jun 27, 2016 · 6 comments
Closed

Correct Way of Using update.train? #445

terrytangyuan opened this issue Jun 27, 2016 · 6 comments

Comments

@terrytangyuan
Copy link
Contributor

terrytangyuan commented Jun 27, 2016

@topepo Is this the correct way to continue training from an existing model? Seems like update only updates the model object to some most recent compatible version without actually calling fit using the new dataset? I think I am missing something important here.

previousModel <- readRDS("....xxx.rds")  # load previously saved model object
previousModel$trainingData <- trainData # change training data to new data
newModel <- update(object = previousModel)
@zachmayer
Copy link
Collaborator

I updated your comment to include the issue template you deleted. Please update each code chunk with the appropriate runnable code to replicate your issue, and then go through the checklist and check off the boxes as you complete the tasks.

@zachmayer
Copy link
Collaborator

ok I see the issue: update.train is meant for updating the tuning parameters, not the training data. So if the tuning parameters don't change, the model won't be re-fit.

@terrytangyuan
Copy link
Contributor Author

@zachmayer I see. Thanks for your quick response! Could I add a forceRefit option in update.train? I think it makes more sense.

@zachmayer
Copy link
Collaborator

That sounds like a good idea to me— make a PR!

terrytangyuan added a commit to terrytangyuan/caret that referenced this issue Jun 27, 2016
@Artem-fb
Copy link

Artem-fb commented Dec 4, 2018

@terrytangyuan , hi! so there is no way to quickly refit model with new data? I want to re-fit it with each new row, like online learning

@terrytangyuan
Copy link
Contributor Author

Probably not directly with caret. You can try continue training through XGBoost.

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

No branches or pull requests

3 participants