From: Benjamin Auder Date: Tue, 8 Jun 2021 13:25:00 +0000 (+0200) Subject: Rename Agghoo class into AgghooCV (to avoid case-insensitive issues) X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/images/img/current/assets/rpsls.css?a=commitdiff_plain;h=cca5f1c67bd622fb7bc1279dfe4c3336d1446efd;p=agghoo.git Rename Agghoo class into AgghooCV (to avoid case-insensitive issues) --- diff --git a/DESCRIPTION b/DESCRIPTION index 00e2df3..7944819 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,6 +28,6 @@ License: MIT + file LICENSE RoxygenNote: 7.1.1 Collate: 'agghoo.R' - 'R6_Agghoo.R' + 'R6_AgghooCV.R' 'R6_Model.R' 'A_NAMESPACE.R' diff --git a/NAMESPACE b/NAMESPACE index 7604bfd..14fb7a3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,6 @@ # Generated by roxygen2: do not edit by hand -export(Agghoo) +export(AgghooCV) export(Model) export(agghoo) export(compareToStandard) diff --git a/R/A_NAMESPACE.R b/R/A_NAMESPACE.R index 0902c59..6747346 100644 --- a/R/A_NAMESPACE.R +++ b/R/A_NAMESPACE.R @@ -1,4 +1,4 @@ #' @include R6_Model.R -#' @include R6_Agghoo.R +#' @include R6_AgghooCV.R #' @include agghoo.R NULL diff --git a/R/R6_Agghoo.R b/R/R6_AgghooCV.R similarity index 98% rename from R/R6_Agghoo.R rename to R/R6_AgghooCV.R index 3694715..4ceb289 100644 --- a/R/R6_Agghoo.R +++ b/R/R6_AgghooCV.R @@ -5,9 +5,9 @@ #' from the list of models (see 'Model' class). #' #' @export -Agghoo <- R6::R6Class("Agghoo", +AgghooCV <- R6::R6Class("AgghooCV", public = list( - #' @description Create a new Agghoo object. + #' @description Create a new AgghooCV object. #' @param data Matrix or data.frame #' @param target Vector of targets (generally numeric or factor) #' @param task "regression" or "classification" diff --git a/R/agghoo.R b/R/agghoo.R index 528df2a..92d061f 100644 --- a/R/agghoo.R +++ b/R/agghoo.R @@ -16,9 +16,9 @@ #' Default: see R6::Model. #' @param quality A function assessing the quality of a prediction. #' Arguments are y1 and y2 (comparing a prediction to known values). -#' Default: see R6::Agghoo. +#' Default: see R6::AgghooCV. #' -#' @return An R6::Agghoo object. +#' @return An R6::AgghooCV object. #' #' @examples #' # Regression: @@ -66,8 +66,8 @@ agghoo <- function(data, target, task = NA, gmodel = NA, params = NA, quality = } # Build Model object (= list of parameterized models) model <- Model$new(data, target, task, gmodel, params) - # Return Agghoo object, to run and predict - Agghoo$new(data, target, task, model, quality) + # Return AgghooCV object, to run and predict + AgghooCV$new(data, target, task, model, quality) } #' compareToStandard diff --git a/man/Agghoo.Rd b/man/AgghooCV.Rd similarity index 78% rename from man/Agghoo.Rd rename to man/AgghooCV.Rd index dc70db6..4d4cf78 100644 --- a/man/Agghoo.Rd +++ b/man/AgghooCV.Rd @@ -1,7 +1,7 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/R6_Agghoo.R -\name{Agghoo} -\alias{Agghoo} +% Please edit documentation in R/R6_AgghooCV.R +\name{AgghooCV} +\alias{AgghooCV} \title{R6 class with agghoo functions fit() and predict().} \description{ Class encapsulating the methods to run to obtain the best predictor @@ -10,19 +10,19 @@ from the list of models (see 'Model' class). \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{Agghoo$new()}} -\item \href{#method-fit}{\code{Agghoo$fit()}} -\item \href{#method-predict}{\code{Agghoo$predict()}} -\item \href{#method-clone}{\code{Agghoo$clone()}} +\item \href{#method-new}{\code{AgghooCV$new()}} +\item \href{#method-fit}{\code{AgghooCV$fit()}} +\item \href{#method-predict}{\code{AgghooCV$predict()}} +\item \href{#method-clone}{\code{AgghooCV$clone()}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-new}{}}} \subsection{Method \code{new()}}{ -Create a new Agghoo object. +Create a new AgghooCV object. \subsection{Usage}{ -\if{html}{\out{
}}\preformatted{Agghoo$new(data, target, task, gmodel, quality = NA)}\if{html}{\out{
}} +\if{html}{\out{
}}\preformatted{AgghooCV$new(data, target, task, gmodel, quality = NA)}\if{html}{\out{
}} } \subsection{Arguments}{ @@ -48,7 +48,7 @@ quality(y1, y2) --> real number} \subsection{Method \code{fit()}}{ Fit an agghoo model. \subsection{Usage}{ -\if{html}{\out{
}}\preformatted{Agghoo$fit( +\if{html}{\out{
}}\preformatted{AgghooCV$fit( CV = list(type = "MC", V = 10, test_size = 0.2, shuffle = TRUE), mode = "agghoo" )}\if{html}{\out{
}} @@ -76,7 +76,7 @@ Fit an agghoo model. \subsection{Method \code{predict()}}{ Predict an agghoo model (after calling fit()) \subsection{Usage}{ -\if{html}{\out{
}}\preformatted{Agghoo$predict(X, weight = "uniform")}\if{html}{\out{
}} +\if{html}{\out{
}}\preformatted{AgghooCV$predict(X, weight = "uniform")}\if{html}{\out{
}} } \subsection{Arguments}{ @@ -96,7 +96,7 @@ average models performances (TODO: bad idea?!)} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ -\if{html}{\out{
}}\preformatted{Agghoo$clone(deep = FALSE)}\if{html}{\out{
}} +\if{html}{\out{
}}\preformatted{AgghooCV$clone(deep = FALSE)}\if{html}{\out{
}} } \subsection{Arguments}{ diff --git a/man/agghoo.Rd b/man/agghoo.Rd index dea76a1..21afe5a 100644 --- a/man/agghoo.Rd +++ b/man/agghoo.Rd @@ -26,10 +26,10 @@ Default: see R6::Model.} \item{quality}{A function assessing the quality of a prediction. Arguments are y1 and y2 (comparing a prediction to known values). -Default: see R6::Agghoo.} +Default: see R6::AgghooCV.} } \value{ -An R6::Agghoo object. +An R6::AgghooCV object. } \description{ Run the agghoo procedure. (...)