1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/agghoo.R
7 agghoo(data, target, task = NULL, gmodel = NULL, params = NULL, loss = NULL)
10 \item{data}{Data frame or matrix containing the data in lines.}
12 \item{target}{The target values to predict. Generally a vector,
13 but possibly a matrix in the case of "soft classification".}
15 \item{task}{"classification" or "regression". Default:
16 regression if target is numerical, classification otherwise.}
18 \item{gmodel}{A "generic model", which is a function returning a predict
19 function (taking X as only argument) from the tuple
20 (dataHO, targetHO, param), where 'HO' stands for 'Hold-Out',
21 referring to cross-validation. Cross-validation is run on an array
22 of 'param's. See params argument. Default: see R6::Model.}
24 \item{params}{A list of parameters. Often, one list cell is just a
25 numerical value, but in general it could be of any type.
26 Default: see R6::Model.}
28 \item{loss}{A function assessing the error of a prediction.
29 Arguments are y1 and y2 (comparing a prediction to known values).
30 loss(y1, y2) --> real number (error). Default: see R6::AgghooCV.}
33 An R6::AgghooCV object o. Then, call o$fit() and finally o$predict(newData)
36 Run the (core) agghoo procedure.
37 Arguments specify the list of models, their parameters and the
38 cross-validation settings, among others.
42 a_reg <- agghoo(iris[,-c(2,5)], iris[,2])
44 pr <- a_reg$predict(iris[,-c(2,5)] + rnorm(450, sd=0.1))
46 a_cla <- agghoo(iris[,-5], iris[,5])
48 pc <- a_cla$predict(iris[,-5] + rnorm(600, sd=0.1))
52 Guillaume Maillard, Sylvain Arlot, Matthieu Lerasle. "Aggregated hold-out".
53 Journal of Machine Learning Research 22(20):1--55, 2021.
56 Function \code{\link{compareTo}}