Description Usage Arguments Value Super class Active bindings Methods
A class defines a cross-validation task specification.
1 |
options |
|
keys |
A named character vector of keys. |
fit_param |
A list of fit parameters. |
A new CV class object
ml4e::Task -> CV
fit_paramA list of fit parameters.
fit_callA fit call.
cv_predA data.frame of cross-validation predictions.
test_predA data.frame of test predictions.
predA data.frame of all predictions.
cv_scoreA list of cross-validation score.
test_scoreA list of test score.
error_countA list of error counts against folds
error_count_strA character of error counts.
doneA logical if finished
new()Construct a new CV class object.
CV$new(options = NULL, keys = NULL, fit_param = NULL)
optionsA Options class object.
keysA named character vector of keys.
fit_paramA list of fit parameters. If NULL, keys must have
"fit_param" key.
A new CV class object
print()Print object.
CV$print()
get_resample()Get a resample.
CV$get_resample(seed = NULL)
seedA integer scalar seed.
A resample of rset class object.
convert_data()Convert data by self$data_call.
CV$convert_data(data)
dataA data.frame or rsplit object to be converted.
A converted data appropreate for the model input.
fit()Fit model by self$fit_call.
CV$fit(data = NULL)
dataA data.frame or rsplit object.
A model fitted object.
predict()Predict by a model.
CV$predict(fitted = NULL, new_data = NULL, ids = NULL)
fittedA model fitted object.
new_dataA data.frame to be predicted.
idsA integer vector of row indexes.
A data.frame of predicted values.
get_fitted()Get a fitted object by all training data.
CV$get_fitted()
do()Run a cross-validation. The result will be stored in self$result.
CV$do(cv_seed = TRUE)
cv_seedA logical scalar whether to use self$cv_seed. If
FALSE, then self$search_seed is used.
clone()The objects of this class are cloneable with this method.
CV$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.