Skip to content

Commit

Permalink
document censored regression as a possible mode (#1040)
Browse files Browse the repository at this point in the history
* use @inheritParams nearest_neighbor rather then boost_tree

* add possible values for censored regression
  • Loading branch information
EmilHvitfeldt authored Jan 8, 2024
1 parent 8f13c1c commit b305a8e
Show file tree
Hide file tree
Showing 27 changed files with 39 additions and 30 deletions.
1 change: 1 addition & 0 deletions R/bag_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams decision_tree
#' @param class_cost A non-negative scalar for a class cost (where a cost of 1
#' means no extra cost). This is useful for when the first level of the outcome
Expand Down
1 change: 1 addition & 0 deletions R/bart.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams nearest_neighbor
#' @inheritParams boost_tree
#' @param prior_terminal_node_coef A coefficient for the prior probability that
#' a node is a terminal node. Values are usually between 0 and one with
Expand Down
4 changes: 2 additions & 2 deletions R/boost_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#' \url{https://www.tidymodels.org/}.
#'
#' @param mode A single character string for the prediction outcome mode.
#' Possible values for this model are "unknown", "regression", or
#' "classification".
#' Possible values for this model are "unknown", "regression",
#' "classification", or "censored regression".
#' @param engine A single character string specifying what computational engine
#' to use for fitting.
#' @param mtry A number for the number (or proportion) of predictors that will
Expand Down
2 changes: 1 addition & 1 deletion R/c5_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the type of model.
#' The only possible value for this model is "classification".
#' @param trees A non-negative integer (no greater than 100) for the number
Expand Down
2 changes: 1 addition & 1 deletion R/cubist_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the type of model.
#' The only possible value for this model is "regression".
#' @param committees A non-negative integer (no greater than 100) for the number
Expand Down
2 changes: 1 addition & 1 deletion R/discrim_flexible.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @inheritParams discrim_linear
#' @param num_terms The number of features that will be retained in the
#' final model, including the intercept.
Expand Down
2 changes: 1 addition & 1 deletion R/discrim_linear.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the type of model. The only
#' possible value for this model is "classification".
#' @param penalty An non-negative number representing the amount of
Expand Down
2 changes: 1 addition & 1 deletion R/discrim_quad.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the type of model. The only
#' possible value for this model is "classification".
#' @param regularization_method A character string for the type of regularized
Expand Down
2 changes: 1 addition & 1 deletion R/discrim_regularized.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @inheritParams discrim_linear
#' @param frac_common_cov,frac_identity Numeric values between zero and one.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/gen_additive_mod.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param select_features `TRUE` or `FALSE.` If `TRUE`, the model has the
#' ability to eliminate a predictor (via penalization). Increasing
#' `adjust_deg_free` will increase the likelihood of removing predictors.
Expand Down
2 changes: 1 addition & 1 deletion R/mars.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param num_terms The number of features that will be retained in the
#' final model, including the intercept.
#' @param prod_degree The highest possible interaction degree.
Expand Down
1 change: 1 addition & 0 deletions R/mlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams nearest_neighbor
#' @inheritParams boost_tree
#' @param hidden_units An integer for the number of units in the hidden model.
#' @param penalty A non-negative numeric value for the amount of weight
Expand Down
2 changes: 1 addition & 1 deletion R/naive_Bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @inheritParams discrim_linear
#' @param smoothness An non-negative number representing the the relative
#' smoothness of the class boundary. Smaller examples result in model flexible
Expand Down
6 changes: 5 additions & 1 deletion R/nearest_neighbor.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @param mode A single character string for the prediction outcome mode.
#' Possible values for this model are "unknown", "regression", or
#' "classification".
#' @param engine A single character string specifying what computational engine
#' to use for fitting.
#' @param neighbors A single integer for the number of neighbors
#' to consider (often called `k`). For \pkg{kknn}, a value of 5
#' is used if `neighbors` is not specified.
Expand Down
2 changes: 1 addition & 1 deletion R/pls.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param predictor_prop The maximum proportion of original predictors that can
#' have _non-zero_ coefficients for each PLS component (via regularization).
#' This value is used for all PLS components for X.
Expand Down
2 changes: 1 addition & 1 deletion R/poisson_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the type of model.
#' The only possible value for this model is "regression".
#' @param penalty A non-negative number representing the total
Expand Down
2 changes: 1 addition & 1 deletion R/proportional_hazards.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @inheritParams linear_reg
#' @param mode A single character string for the prediction outcome mode.
#' The only possible value for this model is "censored regression".
Expand Down
1 change: 1 addition & 0 deletions R/rule_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams nearest_neighbor
#' @inheritParams boost_tree
#' @param penalty L1 regularization parameter.
#' @details
Expand Down
2 changes: 1 addition & 1 deletion R/surv_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the prediction outcome mode.
#' The only possible value for this model is "regression".
#' @param dist A character string for the probability distribution of the
Expand Down
2 changes: 1 addition & 1 deletion R/survival_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param mode A single character string for the prediction outcome mode.
#' The only possible value for this model is "censored regression".
#' @param dist A character string for the probability distribution of the
Expand Down
2 changes: 1 addition & 1 deletion R/svm_linear.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param cost A positive number for the cost of predicting a sample within
#' or on the wrong side of the margin
#' @param margin A positive number for the epsilon in the SVM insensitive
Expand Down
2 changes: 1 addition & 1 deletion R/svm_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param cost A positive number for the cost of predicting a sample within
#' or on the wrong side of the margin
#' @param degree A positive number for polynomial degree.
Expand Down
2 changes: 1 addition & 1 deletion R/svm_rbf.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' More information on how \pkg{parsnip} is used for modeling is at
#' \url{https://www.tidymodels.org/}.
#'
#' @inheritParams boost_tree
#' @inheritParams nearest_neighbor
#' @param engine A single character string specifying what computational engine
#' to use for fitting. Possible engines are listed below. The default for this
#' model is `"kernlab"`.
Expand Down
9 changes: 5 additions & 4 deletions man/bag_tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/boost_tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/decision_tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/rand_forest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b305a8e

Please sign in to comment.