diff --git a/R/C5_rules.R b/R/C5_rules.R index 0f8cb53..59aaa54 100644 --- a/R/C5_rules.R +++ b/R/C5_rules.R @@ -46,6 +46,7 @@ #' turns this feature off (although it can be re-enabled using #' [C50::C5.0Control()]). #' +#' @return An updated `parsnip` model specification. #' @seealso [parsnip::fit()], [parsnip::fit_xy()], [C50::C5.0()], #' [C50::C5.0Control()] #' @references Quinlan R (1993). _C4.5: Programs for Machine Learning_. Morgan @@ -295,6 +296,10 @@ c5_pred <- function(object, new_data, trials = object$fit$trials["Actual"], ...) #' @param type A single character value or `NULL`. Possible values #' are class" and "prob". #' @param ... Not currently used. +#' @return A tibble with one row for each row of `new_data`. Multiple +#' predictions are contained in a list column called `.pred`. That column has +#' the standard `parsnip` prediction column names as well as the column with +#' the tuning parameter values. #' @details #' For C5.0 rule-based models, the model fit may contain less boosting #' iterations than the number requested. Printing the object will show how many diff --git a/R/cubist.R b/R/cubist.R index 0fd4d0c..01fc143 100644 --- a/R/cubist.R +++ b/R/cubist.R @@ -63,6 +63,7 @@ #' #' The only available engine is `"Cubist"`. #' +#' @return An updated `parsnip` model specification. #' @seealso [parsnip::fit()], [parsnip::fit_xy()], [Cubist::cubist()], #' [Cubist::cubistControl()] #' @references Quinlan R (1992). "Learning with Continuous Classes." Proceedings @@ -404,7 +405,7 @@ tunable.cubist_rules <- function(x, ...) { ) } -#' [multi_predict()] methods for rule-based models +#' `multi_predict()` methods for rule-based models #' @rdname multi_predict #' @export #' @param neighbors An numeric vector of neighbors values between zero and nine. diff --git a/R/rule_fit.R b/R/rule_fit.R index f6176b4..a04407c 100644 --- a/R/rule_fit.R +++ b/R/rule_fit.R @@ -52,6 +52,7 @@ #' #' The only available engine is `"xrf"`. #' +#' @return An updated `parsnip` model specification. #' @seealso [parsnip::fit()], [parsnip::fit_xy()], [xrf::xrf.formula()] #' @references Friedman, J. H., and Popescu, B. E. (2008). "Predictive learning #' via rule ensembles." _The Annals ofApplied Statistics_, 2(3), 916-954. @@ -492,6 +493,8 @@ tunable.rule_fit <- function(x, ...) { #' Proportion of Randomly Selected Predictors #' #' @inheritParams committees +#' @return A `dials` with classes "quant_param" and "param". The `range` element +#' of the object is always converted to a list with elements "lower" and "upper". #' @export mtry_prop <- function(range = c(0.1, 1), trans = NULL) { dials::new_quant_param( diff --git a/man/C5_rules.Rd b/man/C5_rules.Rd index 777ad16..3e83272 100644 --- a/man/C5_rules.Rd +++ b/man/C5_rules.Rd @@ -38,6 +38,9 @@ or replaced wholesale.} \item{...}{Not used for \code{update()}.} } +\value{ +An updated \code{parsnip} model specification. +} \description{ \code{\link[=C5_rules]{C5_rules()}} is a way to generate a \emph{specification} of a model before fitting. The main arguments for the model are: diff --git a/man/cubist_rules.Rd b/man/cubist_rules.Rd index 7b1e467..9981fe4 100644 --- a/man/cubist_rules.Rd +++ b/man/cubist_rules.Rd @@ -46,6 +46,9 @@ or replaced wholesale.} \item{...}{Not used for \code{update()}.} } +\value{ +An updated \code{parsnip} model specification. +} \description{ \code{\link[=cubist_rules]{cubist_rules()}} is a way to generate a \emph{specification} of a model before fitting. The main arguments for the model are: diff --git a/man/mtry_prop.Rd b/man/mtry_prop.Rd index 42bedf0..aba85c3 100644 --- a/man/mtry_prop.Rd +++ b/man/mtry_prop.Rd @@ -15,6 +15,10 @@ largest possible values, respectively.} the default is used which matches the units used in \code{range}. If no transformation, \code{NULL}.} } +\value{ +A \code{dials} with classes "quant_param" and "param". The \code{range} element +of the object is always converted to a list with elements "lower" and "upper". +} \description{ Proportion of Randomly Selected Predictors } diff --git a/man/multi_predict.Rd b/man/multi_predict.Rd index d7b0191..9f25cc0 100644 --- a/man/multi_predict.Rd +++ b/man/multi_predict.Rd @@ -4,7 +4,7 @@ \alias{multi_predict._c5_rules} \alias{multi_predict._cubist} \alias{multi_predict._xrf} -\title{\code{\link[=multi_predict]{multi_predict()}} methods for rule-based models} +\title{\code{multi_predict()} methods for rule-based models} \usage{ \method{multi_predict}{`_c5_rules`}(object, new_data, type = NULL, trees = NULL, ...) @@ -28,8 +28,14 @@ are class" and "prob".} \item{penalty}{Non-negative penalty values.} } +\value{ +A tibble with one row for each row of \code{new_data}. Multiple +predictions are contained in a list column called \code{.pred}. That column has +the standard \code{parsnip} prediction column names as well as the column with +the tuning parameter values. +} \description{ -\code{\link[=multi_predict]{multi_predict()}} methods for rule-based models +\code{multi_predict()} methods for rule-based models } \details{ For C5.0 rule-based models, the model fit may contain less boosting diff --git a/man/rule_fit.Rd b/man/rule_fit.Rd index 9d4ef88..ad62936 100644 --- a/man/rule_fit.Rd +++ b/man/rule_fit.Rd @@ -72,6 +72,9 @@ or replaced wholesale.} \item{...}{Not used for \code{update()}.} } +\value{ +An updated \code{parsnip} model specification. +} \description{ \code{\link[=rule_fit]{rule_fit()}} is a way to generate a \emph{specification} of a model before fitting. The main arguments for the model are: