Model validation by repeated bootstrapping
[R6::R6Class] object.
Sebastian Malkusch
permutereturns the instance variable 'permute'. (character)
permute_alphabetreturns the instance variable 'permute_alphabet'. (character)
n_resamplereturns the instance variable 'n_resample'. (integer)
fml_methodreturns the instance variable 'fml_method'. (character)
fml_typereturns the instance variable 'fml_type'. (character)
fml_type_alphabetreturns the instance variable 'fml_type_alphabet'. (character)
pre_process_lstreturns the instance variable 'pre_process_lst'. (character)
hyper_parametersreturns the instance variable 'hyper_parameters'. (list)
response_varreturns the instance variable 'response_var'. (character)
n_featuresreturns the instance variable 'n_features'. (integer)
strata_varreturns the instance variable 'strata_var'. (character)
metrics_dfreturns the instance variable 'metrics_df'. (tibble::tibble)
confusion_dfreturns the instance variable 'confusion_df'. (tibble::tibble)
new()checks, if permutation is requested. If true, performs the permutation task.
Checks if ml.type is classification. If true, calculates confusion matrix.
Creates and returns instance of Resampler class.
Resampler$new(
n_resample = 500,
fml_method = "pcr",
fml_type = "classification",
hyper_parameters = "list",
pre_process_lst = c("center", "scale"),
permute = NULL,
n_features = 0,
response_var = "character",
strata_var = NULL
)n_resamplenumber of bootstrap resamples. The default is 500 (integer)
fml_methodML model that is being used. The default is 'pcr' (character).
fml_typeML model type. Needs to be 'classification', 'regression' or 'censored'. Default is 'classification' (character).
hyper_parametersList of model hyper parameters. (list)
pre_process_lstVector of pre-processing steps. Default is 'c("center", "scale")' (character).
permutePermutation method. Needs to be 'none', 'features' or 'response'. (character)
n_featuresNumber of features to be chosen in the permutation experiment. Default is 0 (integer).
response_varResponse variable of the model (character).
strata_varStratification variable (character).
Resampler
character
fit()Runs the bootstrap analysis based on the instance variables chosen under initialize.
Resampler$fit(data_df = "tbl_df")data_dfdata set to be analyzed (tibble::tibble).
None
clone()The objects of this class are cloneable with this method.
Resampler$clone(deep = FALSE)deepWhether to make a deep clone.
Uses repeated bootstrapping to validate models without a test data set. For each experiment multiple metrics are measured. For classification experiments the confusion matrix is calculated additionally. In order to test hypotheses, either features or the response variable can be permuted.