Skip to contents

This function runs a learning experiment based on the classifier object and the given dataset.

Usage

fit(
  X,
  y,
  clf,
  cross.validate = FALSE,
  lfolds = NULL,
  nfolds = 10,
  parallelize.folds = TRUE,
  compute.importance = TRUE,
  return.all = FALSE,
  log.file = "parallel.log",
  path = NULL
)

Arguments

X:

Dataset to classify

y:

Variable to predict

clf:

The classifier object object containing the settings of the classifier

cross.validate:

Whether or not the classification should be run in cross-validation mode (default:TRUE)

lfolds:

The folds to be used for the cross-validation

nfolds:

The number of folds to use in the cross-validation. If lfolds are not specified this option allows to set them up (default:10)

parallelize.folds:

Switch setting the parallelization mode based on cross-validation folds and nothing else in the algorithm (default:TRUE). This is much more efficient.

compute.importance:

The importance of variables in the learning process during cross-validation can be computed. This is based on data perturbation similar to the mean decrease accuracy in the random forest algorithm. Moreover, this gives feature prevalence in models during CV (default:TRUE)

return.all:

Should all results from the cross-validation steps be returned. This is usually needed when testing stability of the models (default:FALSE)

log.file:

The output file for parallel logs (default:'parallel.log')

path:

The path where to save temporary data

Value

An experiment object containing the classifier along with the classification results as a sub-element