Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caret - is it possible to save each models from tuning?

Tags:

r

r-caret

I'm using caret to train models over resamples and tune learning parameters, and I can interrogate the probabilities for each test, which is great. But I'm also keen to retain the model objects and use them later without retraining -- is this possible? Basically rather than just the mdl$finalModel object, I'd like the model object for each iteration of tuning.

like image 530
Shane Avatar asked Sep 02 '25 13:09

Shane


1 Answers

Not really. You could write a custom method and modify the fit function to save them out to a file. Inside the fit function, you would know the tuning parameter value but not what resample that the model was build with.

Max

like image 197
topepo Avatar answered Sep 05 '25 04:09

topepo