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