1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/R6_AgghooCV.R
5 \title{R6 class with agghoo functions fit() and predict().}
7 Class encapsulating the methods to run to obtain the best predictor
8 from the list of models (see 'Model' class).
10 \section{Public fields}{
11 \if{html}{\out{<div class="r6-fields">}}
13 \item{\code{params}}{List of parameters of the V selected models}
15 \if{html}{\out{</div>}}
18 \subsection{Public methods}{
20 \item \href{#method-new}{\code{AgghooCV$new()}}
21 \item \href{#method-fit}{\code{AgghooCV$fit()}}
22 \item \href{#method-predict}{\code{AgghooCV$predict()}}
23 \item \href{#method-getParams}{\code{AgghooCV$getParams()}}
24 \item \href{#method-clone}{\code{AgghooCV$clone()}}
28 \if{html}{\out{<a id="method-new"></a>}}
29 \if{latex}{\out{\hypertarget{method-new}{}}}
30 \subsection{Method \code{new()}}{
31 Create a new AgghooCV object.
33 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$new(data, target, task, gmodel, loss = NULL)}\if{html}{\out{</div>}}
36 \subsection{Arguments}{
37 \if{html}{\out{<div class="arguments">}}
39 \item{\code{data}}{Matrix or data.frame}
41 \item{\code{target}}{Vector of targets (generally numeric or factor)}
43 \item{\code{task}}{"regression" or "classification"}
45 \item{\code{gmodel}}{Generic model returning a predictive function}
47 \item{\code{loss}}{Function assessing the error of a prediction}
49 \if{html}{\out{</div>}}
53 \if{html}{\out{<a id="method-fit"></a>}}
54 \if{latex}{\out{\hypertarget{method-fit}{}}}
55 \subsection{Method \code{fit()}}{
58 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$fit(CV = list(type = "MC", V = 10, test_size = 0.2, shuffle = TRUE))}\if{html}{\out{</div>}}
61 \subsection{Arguments}{
62 \if{html}{\out{<div class="arguments">}}
64 \item{\code{CV}}{List describing cross-validation to run. Slots:
65 - type: 'vfold' or 'MC' for Monte-Carlo (default: MC)
66 - V: number of runs (default: 10)
67 - test_size: percentage of data in the test dataset, for MC
68 (irrelevant for V-fold). Default: 0.2.
69 - shuffle: wether or not to shuffle data before V-fold.
70 Irrelevant for Monte-Carlo; default: TRUE}
72 \if{html}{\out{</div>}}
76 \if{html}{\out{<a id="method-predict"></a>}}
77 \if{latex}{\out{\hypertarget{method-predict}{}}}
78 \subsection{Method \code{predict()}}{
79 Predict an agghoo model (after calling fit())
81 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$predict(X)}\if{html}{\out{</div>}}
84 \subsection{Arguments}{
85 \if{html}{\out{<div class="arguments">}}
87 \item{\code{X}}{Matrix or data.frame to predict}
89 \if{html}{\out{</div>}}
93 \if{html}{\out{<a id="method-getParams"></a>}}
94 \if{latex}{\out{\hypertarget{method-getParams}{}}}
95 \subsection{Method \code{getParams()}}{
96 Return the list of V best parameters (after calling fit())
98 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$getParams()}\if{html}{\out{</div>}}
102 \if{html}{\out{<hr>}}
103 \if{html}{\out{<a id="method-clone"></a>}}
104 \if{latex}{\out{\hypertarget{method-clone}{}}}
105 \subsection{Method \code{clone()}}{
106 The objects of this class are cloneable with this method.
108 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$clone(deep = FALSE)}\if{html}{\out{</div>}}
111 \subsection{Arguments}{
112 \if{html}{\out{<div class="arguments">}}
114 \item{\code{deep}}{Whether to make a deep clone.}
116 \if{html}{\out{</div>}}