Versage
Versage

Reputation: 58

Using R Caret model with different tunning parameters

I trained a NNET Caret Model with three sizes in tuning function. The final Model was fitted with one size. It was choosed by the smallest RMSE, automatically.

    Neural Network 

9700 samples
  23 predictor

Pre-processing: centered, scaled 
Resampling: Cross-Validated (8 fold, repeated 8 times) 

Summary of sample sizes: 8488, 8488, 8487, 8485, 8488, 8488, ... 

Resampling results across tuning parameters:

  size  RMSE    Rsquared  RMSE SD   Rsquared SD
  12    0.0328  0.951     0.002033  0.006127   
  24    0.0221  0.978     0.001358  0.002764   
  72    0.0134  0.992     0.000647  0.000815   

Tuning parameter 'decay' was held constant at a value of 5e-04
RMSE was used to select the optimal model using  the smallest value.
The final values used for the model were size = 72 and decay = 5e-04. 

But I want to explore the models trained with the others sizes too. Can I use the the predict function with others tunning parameters of the model?

Upvotes: 1

Views: 206

Answers (1)

topepo
topepo

Reputation: 14331

If you use the savePredictions argument of trainControl, you can get the hold-out predictions from the different models in the tuning grid. Apart from that, you would need to fit separate models.

Max

Upvotes: 3

Related Questions