Train models using a combination of parameter values for model selection
gridSearchLearn(x, y, mod, grid.params, fixed.params = NULL,
search.type = c("exhaustive", "randomized"),
resample.rtset = rtset.resample(), randomized.p = 0.05,
weights = NULL, error.aggregate.fn = mean, metric = NULL,
maximize = NULL, save.mod = FALSE, verbose = TRUE,
call.depth = 1, grid.verbose = FALSE, n.cores = rtCores, ...)
features - training set. Will be resampled to multiple train-test sets
outcome - training set. Will be resampled to multiple train-test sets
String: rtemis model. See modSelect()
gives available models
List of named elements, each is a vector of values
List of named elements, each is a single value (Classification will always maximize Accuracy)
String: "exhaustive" (Default), "randomized". Type of grid search to use. Exhaustive search will
try all combinations of parameters. Randomized will try a random sample of size randomize.p
* N
of all combinations
List: Output of rtset.grid.resample()
Float (0, 1): For search.type == "exhaustive"
, sample this portion of combination. Default = .05
Float, vector: Case weights
Function: Use this when aggregating error metrics. Default = mean
String: Metric to minimize or maximize
Logical: If TRUE, maximize metric
Logical: If TRUE, save all trained models. Default = FALSE
Logical: If TRUE, print messages to screen
Integer: passed to msg. Default = 2
Logical: Passed to learner
's verbose
argument
Integer: Number of cores to use
Additional arguments to be passed to resample
Note that weights, if defined (and not NULL), should be passed directly to gridSearchLearn
as they need to be resampled along x
and y
, and should not be passed along with
grid.params
. ipw
and ipw.type
should be passed as part of grid.params
and will be passed on to the learner.
Includes a special case for training s.H2OGBM or s.GBM which requires extracting and averaging n.trees
along with params.