This function trains a model fit by SLOPE()
by tuning its parameters
through cross-validation.
Usage
cvSLOPE(
x,
y,
q = 0.2,
gamma = 0,
n_folds = 10,
n_repeats = 1,
measure = c("mse", "mae", "deviance", "misclass", "auc"),
...
)
Arguments
- x
the design matrix, which can be either a dense matrix of the standard matrix class, or a sparse matrix inheriting from Matrix::sparseMatrix. Data frames will be converted to matrices internally.
- y
the response, which for
family = "gaussian"
must be numeric; forfamily = "binomial"
orfamily = "multinomial"
, it can be a factor.- q
a vector of quantiles for the
q
parameter in SLOPE- gamma
relaxation parameter for SLOPE. Default is
0.0
, which implies to relaxation of the penalty.- n_folds
number of folds (cross-validation)
- n_repeats
number of folds (cross-validation)
- measure
DEPRECATED
- ...
other arguments to pass on to
SLOPE()
Value
An object of class "TrainedSLOPE"
, with the following slots:
- summary
a summary of the results with means, standard errors, and 0.95 confidence levels
- data
the raw data from the model training
- optima
a
data.frame
of the best (mean) values for the different metrics and their corresponding parameter values- measure
a
data.frame
listing the used metric and its label- call
the call
See also
Other model-tuning:
plot.TrainedSLOPE()
,
trainSLOPE()