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).
11 \subsection{Public methods}{
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-getParams}{\code{AgghooCV$getParams()}}
17 \item \href{#method-clone}{\code{AgghooCV$clone()}}
21 \if{html}{\out{<a id="method-new"></a>}}
22 \if{latex}{\out{\hypertarget{method-new}{}}}
23 \subsection{Method \code{new()}}{
24 Create a new AgghooCV object.
26 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$new(data, target, task, gmodel, loss)}\if{html}{\out{</div>}}
29 \subsection{Arguments}{
30 \if{html}{\out{<div class="arguments">}}
32 \item{\code{data}}{Matrix or data.frame}
34 \item{\code{target}}{Vector of targets (generally numeric or factor)}
36 \item{\code{task}}{"regression" or "classification"}
38 \item{\code{gmodel}}{Generic model returning a predictive function}
40 \item{\code{loss}}{Function assessing the error of a prediction}
42 \if{html}{\out{</div>}}
46 \if{html}{\out{<a id="method-fit"></a>}}
47 \if{latex}{\out{\hypertarget{method-fit}{}}}
48 \subsection{Method \code{fit()}}{
51 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$fit(CV = NULL)}\if{html}{\out{</div>}}
54 \subsection{Arguments}{
55 \if{html}{\out{<div class="arguments">}}
57 \item{\code{CV}}{List describing cross-validation to run. Slots: \cr
58 - type: 'vfold' or 'MC' for Monte-Carlo (default: MC) \cr
59 - V: number of runs (default: 10) \cr
60 - test_size: percentage of data in the test dataset, for MC
61 (irrelevant for V-fold). Default: 0.2. \cr
62 - shuffle: wether or not to shuffle data before V-fold.
63 Irrelevant for Monte-Carlo; default: TRUE \cr
64 Default (if NULL): type="MC", V=10, test_size=0.2}
66 \if{html}{\out{</div>}}
70 \if{html}{\out{<a id="method-predict"></a>}}
71 \if{latex}{\out{\hypertarget{method-predict}{}}}
72 \subsection{Method \code{predict()}}{
73 Predict an agghoo model (after calling fit())
75 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$predict(X)}\if{html}{\out{</div>}}
78 \subsection{Arguments}{
79 \if{html}{\out{<div class="arguments">}}
81 \item{\code{X}}{Matrix or data.frame to predict}
83 \if{html}{\out{</div>}}
87 \if{html}{\out{<a id="method-getParams"></a>}}
88 \if{latex}{\out{\hypertarget{method-getParams}{}}}
89 \subsection{Method \code{getParams()}}{
90 Return the list of V best parameters (after calling fit())
92 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$getParams()}\if{html}{\out{</div>}}
97 \if{html}{\out{<a id="method-clone"></a>}}
98 \if{latex}{\out{\hypertarget{method-clone}{}}}
99 \subsection{Method \code{clone()}}{
100 The objects of this class are cloneable with this method.
102 \if{html}{\out{<div class="r">}}\preformatted{AgghooCV$clone(deep = FALSE)}\if{html}{\out{</div>}}
105 \subsection{Arguments}{
106 \if{html}{\out{<div class="arguments">}}
108 \item{\code{deep}}{Whether to make a deep clone.}
110 \if{html}{\out{</div>}}