
Fitted Models with Cross Validation across a Tuning Grid of Hyper-parameters
FittedGridSearchCV.RdFittedGridSearchCV is an object containing fitted predictive models across
a tuning grid of hyper-parameters returned by GridSearchCV$fit() as well as
relevant model information such as the best performing model, best
hyper-parameters, etc.
Public fields
best_idxAn integer specifying the index of
$modelsthat contains the best-performing model.best_metricThe average performance metric of the best model across cross-validation folds.
best_modelThe best performing predictive model.
best_paramsA named list of the hyper-parameters that result in the optimal predictive model.
foldsA list of length
$modelswhere each element contains a list of the cross-validation indices for each fold.tune_paramsA data.frame of the full hyper-parameter grid.
modelsList of predictive models at every value of
$tune_params.metricsNumeric list; Cross-validation performance metrics for every model in
$models.predictionsA list containing the cross-validation fold predictions for each model in
$models.
Methods
Method new()
Create a new FittedGridSearchCV object.
Usage
FittedGridSearchCV$new(
tune_params,
models,
folds,
metrics,
predictions,
optimize_score
)Arguments
tune_paramsData.frame of the full hyper-parameter grid.
modelsList of predictive models at every value of
$tune_params.foldsList of cross-validation indices at every value of
$tune_params.metricsList of cross-validation performance metrics for every model in
$models.predictionsA list containing the predicted values on the cross-validation folds for every model in
$models.optimize_scoreEither "max" or "min" indicating whether or not the specified performance metric was maximized or minimized to find the optimal predictive model.