Description Usage Format Usage Methods Arguments Examples
Grid search CV is used to train a machine learning model with multiple combinations of training hyper parameters and finds the best combination of parameters which optimizes the evaluation metric. It creates an exhaustive set of hyperparameter combinations and train model on each combination.
1 |
R6Class
object.
For usage details see Methods, Arguments and Examples sections.
1 2 3 | gst = GridSearchTrainer$new(trainer, parameters, n_folds, scoring)
gst$fit(X, y)
gst$best_iteration(metric)
|
$new()
Initialises an instance of grid search cv
$fit()
fit model to an input train data and trains the model.
$best_iteration()
returns best iteration based on a given metric. By default, uses the first scoring metric
superml trainer object, could be either XGBTrainer, RFTrainer, NBTrainer etc.
list containing parameters
number of folds to use to split the train data
scoring metric used to evaluate the best model, multiple values can be provided. currently supports: auc, accuracy, mse, rmse, logloss, mae, f1, precision, recall
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.