Description Usage Arguments Value
View source: R/grid.search.cross.validation.R
Implementation of the grid search approach using K-fold cross-validation for
hyperparameter tuning of a given estimator
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
formula |
an object of class |
data |
an optional data frame, list or environment (or object coercible
by |
estimator |
estimator function that has arguments |
params.list |
list or vector containing hyperparameters and their respective values to consider |
n.folds |
optional number of folds (K) in cross-validation. Default is 5. |
ind.metric |
metric function taking in a numerical vector of predictions for the dependent variable together with a numerical vector of actual outcomes of the dependent variable that returns a performance metric for the individual folds. |
comb.metric |
optional function used to combine individual fold
metrics. Default is |
fold.id |
optional vector containing numerical fold identifiers for
each row in the data. If |
force |
optional boolean indicating whether or not to allow for errors
due to singularity when applying the estimator. If |
verbose |
optional boolean indicating whether to show a progress bar.
Default is |
plot |
optional boolean indicating whether to generate heatmaps of
performance on the grid and displaying the estimated coefficients. Default
is |
contour.scale |
optional vector containing the hyperparameters and
their scales for the axes in the contour plots. Default is |
coef.lims |
optimal limits of the coefficients plot. Default is
|
coef.names |
optional names of coefficients, used in estimates barplot.
Default is |
seed |
optimal seed to specify. Default is |
use.formula |
whether or not to use the formula data combination of X
and y as inputs to the model. Default is |
... |
additional arguments to be passed to the |
grid.search.cross.validation
returns an object of
class
"gscv"
. An object of class "gscv"
is a
list containing at least the following components:
coefficients |
a named vector of optimal coefficients. |
metric |
metric of the optimal hyperparameters. |
params |
a named vector of optimal hyperparameters. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.