Ignore data/ folder
[agghoo.git] / man / AgghooCV.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/R6_AgghooCV.R
3 \name{AgghooCV}
4 \alias{AgghooCV}
5 \title{R6 class with agghoo functions fit() and predict().}
6 \description{
7 Class encapsulating the methods to run to obtain the best predictor
8 from the list of models (see 'Model' class).
9 }
10 \section{Methods}{
11 \subsection{Public methods}{
12 \itemize{
13 \item \href{#method-new}{\code{AgghooCV$new()}}
14 \item \href{#method-fit}{\code{AgghooCV$fit()}}
15 \item \href{#method-predict}{\code{AgghooCV$predict()}}
16 \item \href{#method-clone}{\code{AgghooCV$clone()}}
17 }
18 }
19 \if{html}{\out{<hr>}}
20 \if{html}{\out{<a id="method-new"></a>}}
21 \if{latex}{\out{\hypertarget{method-new}{}}}
22 \subsection{Method \code{new()}}{
23 Create a new AgghooCV object.
24 \subsection{Usage}{
25 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$new(data, target, task, gmodel, quality = NULL)}\if{html}{\out{</div>}}
26 }
27
28 \subsection{Arguments}{
29 \if{html}{\out{<div class="arguments">}}
30 \describe{
31 \item{\code{data}}{Matrix or data.frame}
32
33 \item{\code{target}}{Vector of targets (generally numeric or factor)}
34
35 \item{\code{task}}{"regression" or "classification"}
36
37 \item{\code{gmodel}}{Generic model returning a predictive function}
38
39 \item{\code{quality}}{Function assessing the quality of a prediction;
40 quality(y1, y2) --> real number}
41 }
42 \if{html}{\out{</div>}}
43 }
44 }
45 \if{html}{\out{<hr>}}
46 \if{html}{\out{<a id="method-fit"></a>}}
47 \if{latex}{\out{\hypertarget{method-fit}{}}}
48 \subsection{Method \code{fit()}}{
49 Fit an agghoo model.
50 \subsection{Usage}{
51 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$fit(
52 CV = list(type = "MC", V = 10, test_size = 0.2, shuffle = TRUE),
53 mode = "agghoo"
54 )}\if{html}{\out{</div>}}
55 }
56
57 \subsection{Arguments}{
58 \if{html}{\out{<div class="arguments">}}
59 \describe{
60 \item{\code{CV}}{List describing cross-validation to run. Slots:
61 - type: 'vfold' or 'MC' for Monte-Carlo (default: MC)
62 - V: number of runs (default: 10)
63 - test_size: percentage of data in the test dataset, for MC
64 (irrelevant for V-fold). Default: 0.2.
65 - shuffle: wether or not to shuffle data before V-fold.
66 Irrelevant for Monte-Carlo; default: TRUE}
67
68 \item{\code{mode}}{"agghoo" or "standard" (for usual cross-validation)}
69 }
70 \if{html}{\out{</div>}}
71 }
72 }
73 \if{html}{\out{<hr>}}
74 \if{html}{\out{<a id="method-predict"></a>}}
75 \if{latex}{\out{\hypertarget{method-predict}{}}}
76 \subsection{Method \code{predict()}}{
77 Predict an agghoo model (after calling fit())
78 \subsection{Usage}{
79 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$predict(X, weight = "uniform")}\if{html}{\out{</div>}}
80 }
81
82 \subsection{Arguments}{
83 \if{html}{\out{<div class="arguments">}}
84 \describe{
85 \item{\code{X}}{Matrix or data.frame to predict}
86
87 \item{\code{weight}}{"uniform" (default) or "quality" to weight votes or
88 average models performances (TODO: bad idea?!)}
89 }
90 \if{html}{\out{</div>}}
91 }
92 }
93 \if{html}{\out{<hr>}}
94 \if{html}{\out{<a id="method-clone"></a>}}
95 \if{latex}{\out{\hypertarget{method-clone}{}}}
96 \subsection{Method \code{clone()}}{
97 The objects of this class are cloneable with this method.
98 \subsection{Usage}{
99 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$clone(deep = FALSE)}\if{html}{\out{</div>}}
100 }
101
102 \subsection{Arguments}{
103 \if{html}{\out{<div class="arguments">}}
104 \describe{
105 \item{\code{deep}}{Whether to make a deep clone.}
106 }
107 \if{html}{\out{</div>}}
108 }
109 }
110 }