Class encapsulating the methods to run to obtain the best predictor from the list of models (see 'Model' class).
new()Create a new AgghooCV object.
AgghooCV$new(data, target, task, gmodel, loss)dataMatrix or data.frame
targetVector of targets (generally numeric or factor)
task"regression" or "classification". Default: classification if target not numeric.
gmodelGeneric model returning a predictive function Default: tree if mixed data, knn/ppr otherwise.
lossFunction assessing the error of a prediction Default: error rate or mean(abs(error)).
fit()Fit an agghoo model.
AgghooCV$fit(CV = NULL)CVList describing cross-validation to run. Slots:
- type: 'vfold' or 'MC' for Monte-Carlo (default: MC)
- V: number of runs (default: 10)
- test_size: percentage of data in the test dataset, for MC
(irrelevant for V-fold). Default: 0.2.
- shuffle: wether or not to shuffle data before V-fold.
Irrelevant for Monte-Carlo; default: TRUE
Default (if NULL): type="MC", V=10, test_size=0.2
XMatrix or data.frame to predict
getParams()Return the list of V best parameters (after calling fit())
AgghooCV$getParams()
clone()The objects of this class are cloneable with this method.
AgghooCV$clone(deep = FALSE)deepWhether to make a deep clone.