From 55cf94d839313a15638305b7cb6b8fc9e70f476a Mon Sep 17 00:00:00 2001 From: schalkdaniel Date: Tue, 31 Mar 2020 16:48:34 +0200 Subject: [PATCH] update docs --- DESCRIPTION | 2 +- man/BaselearnerCustom.Rd | 4 +++- man/BaselearnerCustomCpp.Rd | 4 +++- man/BaselearnerPSpline.Rd | 4 +++- man/BaselearnerPolynomial.Rd | 4 +++- man/BlearnerFactoryList.Rd | 4 +++- man/Compboost.Rd | 4 +++- man/Compboost_internal.Rd | 4 +++- man/InMemoryData.Rd | 4 +++- man/LoggerInbagRisk.Rd | 4 +++- man/LoggerIteration.Rd | 4 +++- man/LoggerList.Rd | 4 +++- man/LoggerOobRisk.Rd | 4 +++- man/LoggerTime.Rd | 4 +++- man/LossAbsolute.Rd | 4 +++- man/LossBinomial.Rd | 4 +++- man/LossCustom.Rd | 4 +++- man/LossCustomCpp.Rd | 4 +++- man/LossHuber.Rd | 4 +++- man/LossQuadratic.Rd | 4 +++- man/LossQuantile.Rd | 4 +++- man/OptimizerCoordinateDescent.Rd | 4 +++- man/OptimizerCoordinateDescentLineSearch.Rd | 4 +++- man/ResponseBinaryClassif.Rd | 4 +++- man/ResponseRegr.Rd | 4 +++- man/boostLinear.Rd | 17 ++++++++++---- man/boostSplines.Rd | 25 ++++++++++++++++----- 27 files changed, 106 insertions(+), 34 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2c03d5ff..e58b44f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,7 +16,7 @@ Description: C++ implementation of component-wise boosting to License: MIT + file LICENSE Encoding: UTF-8 LazyData: true -RoxygenNote: 6.1.1 +RoxygenNote: 7.1.0 Depends: R (>= 3.4.0) Imports: diff --git a/man/BaselearnerCustom.Rd b/man/BaselearnerCustom.Rd index 223bba23..6e563fe4 100644 --- a/man/BaselearnerCustom.Rd +++ b/man/BaselearnerCustom.Rd @@ -3,7 +3,9 @@ \name{BaselearnerCustom} \alias{BaselearnerCustom} \title{Create custom base-learner factory by using R functions.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{BaselearnerCustom} creates a custom base-learner factory by setting custom \code{R} functions. This factory object can be registered diff --git a/man/BaselearnerCustomCpp.Rd b/man/BaselearnerCustomCpp.Rd index e4fb6239..e2824dfe 100644 --- a/man/BaselearnerCustomCpp.Rd +++ b/man/BaselearnerCustomCpp.Rd @@ -4,7 +4,9 @@ \alias{BaselearnerCustomCpp} \title{Create custom cpp base-learner factory by using cpp functions and external pointer.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{BaselearnerCustomCpp} creates a custom base-learner factory by setting custom \code{C++} functions. This factory object can be registered diff --git a/man/BaselearnerPSpline.Rd b/man/BaselearnerPSpline.Rd index 74ec023f..4630b9a7 100644 --- a/man/BaselearnerPSpline.Rd +++ b/man/BaselearnerPSpline.Rd @@ -3,7 +3,9 @@ \name{BaselearnerPSpline} \alias{BaselearnerPSpline} \title{Base-learner factory to do non-parametric B or P-spline regression} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{BaselearnerPSpline} creates a spline base-learner factory object which can be registered within a base-learner list and then used diff --git a/man/BaselearnerPolynomial.Rd b/man/BaselearnerPolynomial.Rd index 06aac8c3..72d2bef9 100644 --- a/man/BaselearnerPolynomial.Rd +++ b/man/BaselearnerPolynomial.Rd @@ -3,7 +3,9 @@ \name{BaselearnerPolynomial} \alias{BaselearnerPolynomial} \title{Base-learner factory for polynomial regression} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{BaselearnerPolynomial} creates a polynomial base-learner factory object which can be registered within a base-learner list and then used diff --git a/man/BlearnerFactoryList.Rd b/man/BlearnerFactoryList.Rd index 1a024e25..fdf37f46 100644 --- a/man/BlearnerFactoryList.Rd +++ b/man/BlearnerFactoryList.Rd @@ -3,7 +3,9 @@ \name{BlearnerFactoryList} \alias{BlearnerFactoryList} \title{Base-learner factory list to define the set of base-learners} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{BlearnerFactoryList} creates an object in which base-learner factories can be registered. This object can then be passed to compboost as set of diff --git a/man/Compboost.Rd b/man/Compboost.Rd index 8487f894..6bc920fa 100644 --- a/man/Compboost.Rd +++ b/man/Compboost.Rd @@ -3,7 +3,9 @@ \name{Compboost} \alias{Compboost} \title{Compboost API} -\format{\code{\link{R6Class}} object.} +\format{ +\code{\link{R6Class}} object. +} \description{ \code{Compboost} wraps the \code{S4} class system exposed by \code{Rcpp} to make defining objects, adding objects, the training, calculating predictions, and plotting much easier. diff --git a/man/Compboost_internal.Rd b/man/Compboost_internal.Rd index 96a445bd..a4d1814d 100644 --- a/man/Compboost_internal.Rd +++ b/man/Compboost_internal.Rd @@ -3,7 +3,9 @@ \name{Compboost_internal} \alias{Compboost_internal} \title{Main Compboost Class} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class collects all parts such as the factory list or the used logger and passes them to \code{C++}. On the \code{C++} side is then the main diff --git a/man/InMemoryData.Rd b/man/InMemoryData.Rd index c0854e77..3c5439b0 100644 --- a/man/InMemoryData.Rd +++ b/man/InMemoryData.Rd @@ -3,7 +3,9 @@ \name{InMemoryData} \alias{InMemoryData} \title{In memory data class to store data in RAM} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{InMemoryData} creates an data object which can be used as source or target object within the base-learner factories of \code{compboost}. The diff --git a/man/LoggerInbagRisk.Rd b/man/LoggerInbagRisk.Rd index 0d7e37cd..0eb9596f 100644 --- a/man/LoggerInbagRisk.Rd +++ b/man/LoggerInbagRisk.Rd @@ -3,7 +3,9 @@ \name{LoggerInbagRisk} \alias{LoggerInbagRisk} \title{Logger class to log the inbag risk} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class logs the inbag risk for a specific loss function. It is also possible to use custom losses to log performance measures. For details diff --git a/man/LoggerIteration.Rd b/man/LoggerIteration.Rd index 7456bd76..bff144ff 100644 --- a/man/LoggerIteration.Rd +++ b/man/LoggerIteration.Rd @@ -3,7 +3,9 @@ \name{LoggerIteration} \alias{LoggerIteration} \title{Logger class to log the current iteration} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ Logger class to log the current iteration } diff --git a/man/LoggerList.Rd b/man/LoggerList.Rd index 6f6f8ab8..962a6927 100644 --- a/man/LoggerList.Rd +++ b/man/LoggerList.Rd @@ -3,7 +3,9 @@ \name{LoggerList} \alias{LoggerList} \title{Logger list class to collect all loggers} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class is meant to define all logger which should be used to track the progress of the algorithm. diff --git a/man/LoggerOobRisk.Rd b/man/LoggerOobRisk.Rd index 63e67700..dbcf286b 100644 --- a/man/LoggerOobRisk.Rd +++ b/man/LoggerOobRisk.Rd @@ -3,7 +3,9 @@ \name{LoggerOobRisk} \alias{LoggerOobRisk} \title{Logger class to log the out of bag risk} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class logs the out of bag risk for a specific loss function. It is also possible to use custom losses to log performance measures. For details diff --git a/man/LoggerTime.Rd b/man/LoggerTime.Rd index 6c3636ef..a10e2762 100644 --- a/man/LoggerTime.Rd +++ b/man/LoggerTime.Rd @@ -3,7 +3,9 @@ \name{LoggerTime} \alias{LoggerTime} \title{Logger class to log the elapsed time} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class just logs the elapsed time. This should be very handy if one wants to run the algorithm for just 2 hours and see how far he comes within diff --git a/man/LossAbsolute.Rd b/man/LossAbsolute.Rd index 5f56336d..36ffdc87 100644 --- a/man/LossAbsolute.Rd +++ b/man/LossAbsolute.Rd @@ -3,7 +3,9 @@ \name{LossAbsolute} \alias{LossAbsolute} \title{Absolute loss for regression tasks.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This loss can be used for regression with \eqn{y \in \mathrm{R}}. } diff --git a/man/LossBinomial.Rd b/man/LossBinomial.Rd index e7ebfdfd..de7d803c 100644 --- a/man/LossBinomial.Rd +++ b/man/LossBinomial.Rd @@ -3,7 +3,9 @@ \name{LossBinomial} \alias{LossBinomial} \title{0-1 Loss for binary classification derived of the binomial distribution} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This loss can be used for binary classification. The coding we have chosen here acts on diff --git a/man/LossCustom.Rd b/man/LossCustom.Rd index f4497f46..99783821 100644 --- a/man/LossCustom.Rd +++ b/man/LossCustom.Rd @@ -3,7 +3,9 @@ \name{LossCustom} \alias{LossCustom} \title{Create LossCustom by using R functions.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{LossCustom} creates a custom loss by using \code{Rcpp::Function} to set \code{R} functions. diff --git a/man/LossCustomCpp.Rd b/man/LossCustomCpp.Rd index 41eff9ea..6525a607 100644 --- a/man/LossCustomCpp.Rd +++ b/man/LossCustomCpp.Rd @@ -3,7 +3,9 @@ \name{LossCustomCpp} \alias{LossCustomCpp} \title{Create custom cpp losses by using cpp functions and external pointer.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{LossCustomCpp} creates a custom loss by using \code{Rcpp::XPtr} to set \code{C++} functions. diff --git a/man/LossHuber.Rd b/man/LossHuber.Rd index 8f97f1e7..5127391b 100644 --- a/man/LossHuber.Rd +++ b/man/LossHuber.Rd @@ -3,7 +3,9 @@ \name{LossHuber} \alias{LossHuber} \title{Huber loss for regression tasks.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This loss can be used for regression with \eqn{y \in \mathrm{R}}. } diff --git a/man/LossQuadratic.Rd b/man/LossQuadratic.Rd index f2d20e89..67ae29d6 100644 --- a/man/LossQuadratic.Rd +++ b/man/LossQuadratic.Rd @@ -3,7 +3,9 @@ \name{LossQuadratic} \alias{LossQuadratic} \title{Quadratic loss for regression tasks.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This loss can be used for regression with \eqn{y \in \mathrm{R}}. } diff --git a/man/LossQuantile.Rd b/man/LossQuantile.Rd index 718cd1e6..6d669213 100644 --- a/man/LossQuantile.Rd +++ b/man/LossQuantile.Rd @@ -3,7 +3,9 @@ \name{LossQuantile} \alias{LossQuantile} \title{Quantile loss for regression tasks.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This loss can be used for regression with \eqn{y \in \mathrm{R}}. } diff --git a/man/OptimizerCoordinateDescent.Rd b/man/OptimizerCoordinateDescent.Rd index 77fcc795..2c2c246d 100644 --- a/man/OptimizerCoordinateDescent.Rd +++ b/man/OptimizerCoordinateDescent.Rd @@ -3,7 +3,9 @@ \name{OptimizerCoordinateDescent} \alias{OptimizerCoordinateDescent} \title{Coordinate Descent} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class defines a new object for the greedy optimizer. The optimizer just calculates for each base-learner the sum of squared errors and returns diff --git a/man/OptimizerCoordinateDescentLineSearch.Rd b/man/OptimizerCoordinateDescentLineSearch.Rd index bb6ebcd0..509828c8 100644 --- a/man/OptimizerCoordinateDescentLineSearch.Rd +++ b/man/OptimizerCoordinateDescentLineSearch.Rd @@ -3,7 +3,9 @@ \name{OptimizerCoordinateDescentLineSearch} \alias{OptimizerCoordinateDescentLineSearch} \title{Coordinate Descent with line search} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ This class defines a new object which is used to conduct Coordinate Descent with line search. The optimizer just calculates for each base-learner the sum of squared error and returns diff --git a/man/ResponseBinaryClassif.Rd b/man/ResponseBinaryClassif.Rd index 4411641a..26597b7f 100644 --- a/man/ResponseBinaryClassif.Rd +++ b/man/ResponseBinaryClassif.Rd @@ -3,7 +3,9 @@ \name{ResponseBinaryClassif} \alias{ResponseBinaryClassif} \title{Create response object for binary classification.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{ResponseBinaryClassif} creates a response object that are used as target during the fitting process. diff --git a/man/ResponseRegr.Rd b/man/ResponseRegr.Rd index c29f4978..987b8691 100644 --- a/man/ResponseRegr.Rd +++ b/man/ResponseRegr.Rd @@ -3,7 +3,9 @@ \name{ResponseRegr} \alias{ResponseRegr} \title{Create response object for regression.} -\format{\code{\link{S4}} object.} +\format{ +\code{\link{S4}} object. +} \description{ \code{ResponseRegr} creates a response object that are used as target during the fitting process. diff --git a/man/boostLinear.Rd b/man/boostLinear.Rd index cf32ff7b..28500a41 100644 --- a/man/boostLinear.Rd +++ b/man/boostLinear.Rd @@ -4,10 +4,19 @@ \alias{boostLinear} \title{Wrapper to boost linear models for each feature.} \usage{ -boostLinear(data, target, optimizer = OptimizerCoordinateDescent$new(), - loss, learning_rate = 0.05, iterations = 100, trace = -1, - intercept = TRUE, data_source = InMemoryData, - data_target = InMemoryData, oob_fraction = NULL) +boostLinear( + data, + target, + optimizer = OptimizerCoordinateDescent$new(), + loss, + learning_rate = 0.05, + iterations = 100, + trace = -1, + intercept = TRUE, + data_source = InMemoryData, + data_target = InMemoryData, + oob_fraction = NULL +) } \arguments{ \item{data}{[\code{data.frame}]\cr diff --git a/man/boostSplines.Rd b/man/boostSplines.Rd index 6bfd6e70..b62af1a1 100644 --- a/man/boostSplines.Rd +++ b/man/boostSplines.Rd @@ -4,11 +4,23 @@ \alias{boostSplines} \title{Wrapper to boost general additive models for each feature.} \usage{ -boostSplines(data, target, optimizer = OptimizerCoordinateDescent$new(), - loss, learning_rate = 0.05, iterations = 100, trace = -1, - degree = 3, n_knots = 20, penalty = 2, differences = 2, - data_source = InMemoryData, data_target = InMemoryData, - oob_fraction = NULL) +boostSplines( + data, + target, + optimizer = OptimizerCoordinateDescent$new(), + loss, + learning_rate = 0.05, + iterations = 100, + trace = -1, + degree = 3, + n_knots = 20, + penalty = 2, + differences = 2, + data_source = InMemoryData, + data_target = InMemoryData, + oob_fraction = NULL, + use_binning = FALSE +) } \arguments{ \item{data}{[\code{data.frame}]\cr @@ -61,6 +73,9 @@ just in memory training is supported.} \item{oob_fraction}{[\code{numeric(1)}]\cr Fraction of how much data we want to use to track the out of bag risk.} + +\item{use_binning}{[\code{logical(1)}]\cr +Use binning to build design matrices. Saves time and memory (default is FALSE).} } \value{ A model of the \code{Compboost} class. This model is an \code{R6} object