"Model" class, containing a (generic) learning function, which from data + target [+ params] returns a prediction function X --> y. Parameters for cross-validation are either provided or estimated. Model family can be chosen among "tree", "ppr" and "knn" for now.
nmodelsNumber of parameters (= number of [predictive] models)
new()Create a new generic model.
Model$new(data, target, task, gmodel = NULL, params = NULL)dataMatrix or data.frame
targetVector of targets (generally numeric or factor)
task"regression" or "classification"
gmodelGeneric model returning a predictive function; chosen automatically given data and target nature if not provided.
paramsList of parameters for cross-validation (each defining a model)
get()Returns the model at index "index", trained on dataHO/targetHO.
Model$get(dataHO, targetHO, index)dataHOMatrix or data.frame
targetHOVector of targets (generally numeric or factor)
indexIndex of the model in 1...nmodels
getParam()Returns the parameter at index "index".
Model$getParam(index)indexIndex of the model in 1...nmodels
clone()The objects of this class are cloneable with this method.
Model$clone(deep = FALSE)deepWhether to make a deep clone.