diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index da6adfff2..e51edc1be 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -36,15 +36,9 @@ jobs: extra-packages: any::pkgdown, local::. needs: website - - name: Install Miniconda + - name: Install TensorFlow/Keras run: | - reticulate::install_miniconda() - shell: Rscript {0} - - - name: Install TensorFlow - run: | - reticulate::conda_create('r-reticulate', packages = c('python==3.11')) - tensorflow::install_tensorflow(version='2.16') + keras::install_keras() shell: Rscript {0} - name: Install Torch diff --git a/man/details_C5_rules_C5.0.Rd b/man/details_C5_rules_C5.0.Rd index 9708e75d3..63e5b3c9f 100644 --- a/man/details_C5_rules_C5.0.Rd +++ b/man/details_C5_rules_C5.0.Rd @@ -71,6 +71,20 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("C5_rules_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_auto_ml_h2o.Rd b/man/details_auto_ml_h2o.Rd index e94bb222d..04d3913fd 100644 --- a/man/details_auto_ml_h2o.Rd +++ b/man/details_auto_ml_h2o.Rd @@ -32,9 +32,11 @@ performance assessment and potential early stopping. \code{\link[agua:h2o_train]{agua::h2o_train_auto()}} is a wrapper around \code{\link[h2o:h2o.automl]{h2o::h2o.automl()}}. -\if{html}{\out{
}}\preformatted{auto_ml() |> - set_engine("h2o") |> - set_mode("regression") |> +\if{html}{\out{
}}\preformatted{library(agua) + +auto_ml() |> + set_engine("h2o") |> + set_mode("regression") |> translate() }\if{html}{\out{
}} @@ -93,6 +95,22 @@ when R is terminated. To manually stop the h2o server, run \code{h2o::h2o.shutdown()}. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("auto_ml_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ Models fitted with this engine may require native serialization methods diff --git a/man/details_bag_mars_earth.Rd b/man/details_bag_mars_earth.Rd index af4c79590..52f80bd01 100644 --- a/man/details_bag_mars_earth.Rd +++ b/man/details_bag_mars_earth.Rd @@ -103,6 +103,21 @@ Note that the \code{earth} package documentation has: “In the current implementation, \emph{building models with weights can be slow}.” } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("bag_mars_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Breiman, L. 1996. “Bagging predictors”. Machine Learning. 24 (2): diff --git a/man/details_bag_mlp_nnet.Rd b/man/details_bag_mlp_nnet.Rd index ee3e043d5..01f28b580 100644 --- a/man/details_bag_mlp_nnet.Rd +++ b/man/details_bag_mlp_nnet.Rd @@ -93,6 +93,21 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("bag_mlp_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Breiman L. 1996. “Bagging predictors”. Machine Learning. 24 (2): diff --git a/man/details_bag_tree_C5.0.Rd b/man/details_bag_tree_C5.0.Rd index 35ff7bc55..a40771fdb 100644 --- a/man/details_bag_tree_C5.0.Rd +++ b/man/details_bag_tree_C5.0.Rd @@ -61,6 +61,18 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 0 x 2 +## # i 2 variables: mode , type +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Breiman, L. 1996. “Bagging predictors”. Machine Learning. 24 (2): diff --git a/man/details_bag_tree_rpart.Rd b/man/details_bag_tree_rpart.Rd index bb8aca291..43f67a233 100644 --- a/man/details_bag_tree_rpart.Rd +++ b/man/details_bag_tree_rpart.Rd @@ -131,6 +131,18 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 0 x 2 +## # i 2 variables: mode , type +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of type \code{"time"} are predictions of the median survival diff --git a/man/details_bart_dbarts.Rd b/man/details_bart_dbarts.Rd index 53b80fa05..352bc0467 100644 --- a/man/details_bart_dbarts.Rd +++ b/man/details_bart_dbarts.Rd @@ -121,6 +121,25 @@ convert factor columns to indicators. indicators if the user does not create them first. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("bart_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 9 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 regression conf_int +## 4 regression pred_int +## 5 classification class +## 6 classification prob +## # i 3 more rows +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Chipman, George, McCulloch. “BART: Bayesian additive regression diff --git a/man/details_boost_tree_C5.0.Rd b/man/details_boost_tree_C5.0.Rd index ec57afb78..a388662a8 100644 --- a/man/details_boost_tree_C5.0.Rd +++ b/man/details_boost_tree_C5.0.Rd @@ -68,6 +68,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_boost_tree_h2o.Rd b/man/details_boost_tree_h2o.Rd index 1d1233c4e..94ad47e74 100644 --- a/man/details_boost_tree_h2o.Rd +++ b/man/details_boost_tree_h2o.Rd @@ -156,6 +156,26 @@ to \code{TRUE}. For engines that support the proportion interpretation within \verb{[0, 1]}. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(stringr::str_starts(engine, "h2o")) |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 8 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 regression numeric +## 6 regression raw +## # i 2 more rows +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_boost_tree_lightgbm.Rd b/man/details_boost_tree_lightgbm.Rd index f9bfee657..6c6e30625 100644 --- a/man/details_boost_tree_lightgbm.Rd +++ b/man/details_boost_tree_lightgbm.Rd @@ -160,6 +160,23 @@ to \code{TRUE}. For engines that support the proportion interpretation within \verb{[0, 1]}. } +} + +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "lightgbm") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +## 4 classification raw +}\if{html}{\out{
}} \subsection{Bagging}{ The \code{sample_size} argument is translated to the \code{bagging_fraction} diff --git a/man/details_boost_tree_mboost.Rd b/man/details_boost_tree_mboost.Rd index 1904e1992..64eb99572 100644 --- a/man/details_boost_tree_mboost.Rd +++ b/man/details_boost_tree_mboost.Rd @@ -60,6 +60,22 @@ Categorical predictors can be partitioned into groups of factor levels are not required for this model. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "mboost") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 censored regression survival +## 2 censored regression linear_pred +## 3 censored regression time +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of type \code{"time"} are predictions of the mean survival time. diff --git a/man/details_boost_tree_spark.Rd b/man/details_boost_tree_spark.Rd index aad9a6db4..794a6dbf9 100644 --- a/man/details_boost_tree_spark.Rd +++ b/man/details_boost_tree_spark.Rd @@ -118,6 +118,22 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ For models created using the \code{"spark"} engine, there are several things diff --git a/man/details_boost_tree_xgboost.Rd b/man/details_boost_tree_xgboost.Rd index acac5c927..dca1b8843 100644 --- a/man/details_boost_tree_xgboost.Rd +++ b/man/details_boost_tree_xgboost.Rd @@ -131,6 +131,24 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "xgboost") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_cubist_rules_Cubist.Rd b/man/details_cubist_rules_Cubist.Rd index 72d295a40..174cb7275 100644 --- a/man/details_cubist_rules_Cubist.Rd +++ b/man/details_cubist_rules_Cubist.Rd @@ -59,6 +59,20 @@ Categorical predictors can be partitioned into groups of factor levels are not required for this model. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("cubist_rules_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Quinlan R (1992). “Learning with Continuous Classes.” Proceedings of diff --git a/man/details_decision_tree_C5.0.Rd b/man/details_decision_tree_C5.0.Rd index 2b974ff6d..09a10abc2 100644 --- a/man/details_decision_tree_C5.0.Rd +++ b/man/details_decision_tree_C5.0.Rd @@ -59,6 +59,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_decision_tree_partykit.Rd b/man/details_decision_tree_partykit.Rd index 70aa62b87..0d0ef6027 100644 --- a/man/details_decision_tree_partykit.Rd +++ b/man/details_decision_tree_partykit.Rd @@ -125,6 +125,24 @@ Categorical predictors can be partitioned into groups of factor levels are not required for this model. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression survival +## 3 regression numeric +## 4 classification class +## 5 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of type \code{"time"} are predictions of the median survival diff --git a/man/details_decision_tree_rpart.Rd b/man/details_decision_tree_rpart.Rd index cbc4cca01..47ebe6149 100644 --- a/man/details_decision_tree_rpart.Rd +++ b/man/details_decision_tree_rpart.Rd @@ -119,6 +119,26 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 7 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +## 6 censored regression time +## # i 1 more row +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of type \code{"time"} are predictions of the mean survival time. diff --git a/man/details_decision_tree_spark.Rd b/man/details_decision_tree_spark.Rd index 02f24d75a..b108e808a 100644 --- a/man/details_decision_tree_spark.Rd +++ b/man/details_decision_tree_spark.Rd @@ -85,6 +85,22 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ For models created using the \code{"spark"} engine, there are several things diff --git a/man/details_discrim_flexible_earth.Rd b/man/details_discrim_flexible_earth.Rd index 0dd803678..6ac950d75 100644 --- a/man/details_discrim_flexible_earth.Rd +++ b/man/details_discrim_flexible_earth.Rd @@ -73,6 +73,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_flexible_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by diff --git a/man/details_discrim_linear_MASS.Rd b/man/details_discrim_linear_MASS.Rd index bcb3f6463..9ea46e70f 100644 --- a/man/details_discrim_linear_MASS.Rd +++ b/man/details_discrim_linear_MASS.Rd @@ -53,6 +53,22 @@ before fitting the model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_discrim_linear_mda.Rd b/man/details_discrim_linear_mda.Rd index 42222cd34..08f461523 100644 --- a/man/details_discrim_linear_mda.Rd +++ b/man/details_discrim_linear_mda.Rd @@ -64,6 +64,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "mda") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by diff --git a/man/details_discrim_linear_sda.Rd b/man/details_discrim_linear_sda.Rd index 1160a7f25..12529370b 100644 --- a/man/details_discrim_linear_sda.Rd +++ b/man/details_discrim_linear_sda.Rd @@ -69,6 +69,22 @@ before fitting the model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sda") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Ahdesmaki, A., and K. Strimmer. 2010. Feature selection in omics diff --git a/man/details_discrim_linear_sparsediscrim.Rd b/man/details_discrim_linear_sparsediscrim.Rd index f1f79bacb..6d1159eb1 100644 --- a/man/details_discrim_linear_sparsediscrim.Rd +++ b/man/details_discrim_linear_sparsediscrim.Rd @@ -72,6 +72,22 @@ before fitting the model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item \code{lda_diag()}: Dudoit, Fridlyand and Speed (2002) Comparison of diff --git a/man/details_discrim_quad_MASS.Rd b/man/details_discrim_quad_MASS.Rd index f4d201384..b3e499e1c 100644 --- a/man/details_discrim_quad_MASS.Rd +++ b/man/details_discrim_quad_MASS.Rd @@ -54,6 +54,22 @@ model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_discrim_quad_sparsediscrim.Rd b/man/details_discrim_quad_sparsediscrim.Rd index f101499bb..5b21e05e1 100644 --- a/man/details_discrim_quad_sparsediscrim.Rd +++ b/man/details_discrim_quad_sparsediscrim.Rd @@ -71,6 +71,22 @@ model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item \code{qda_diag()}: Dudoit, Fridlyand and Speed (2002) Comparison of diff --git a/man/details_discrim_regularized_klaR.Rd b/man/details_discrim_regularized_klaR.Rd index 665403ba6..6ded96467 100644 --- a/man/details_discrim_regularized_klaR.Rd +++ b/man/details_discrim_regularized_klaR.Rd @@ -74,6 +74,21 @@ model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("discrim_regularized_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Friedman, J (1989). Regularized Discriminant Analysis. \emph{Journal of the diff --git a/man/details_gen_additive_mod_mgcv.Rd b/man/details_gen_additive_mod_mgcv.Rd index 79e0bcbaa..863954922 100644 --- a/man/details_gen_additive_mod_mgcv.Rd +++ b/man/details_gen_additive_mod_mgcv.Rd @@ -144,6 +144,25 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("gen_additive_mod_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 7 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression raw +## 4 classification class +## 5 classification prob +## 6 classification raw +## # i 1 more row +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_linear_reg_brulee.Rd b/man/details_linear_reg_brulee.Rd index f5dee53c6..13f5ab2b1 100644 --- a/man/details_linear_reg_brulee.Rd +++ b/man/details_linear_reg_brulee.Rd @@ -76,6 +76,20 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_linear_reg_gee.Rd b/man/details_linear_reg_gee.Rd index 92f34abb2..d9a15036f 100644 --- a/man/details_linear_reg_gee.Rd +++ b/man/details_linear_reg_gee.Rd @@ -105,6 +105,21 @@ that \code{predict()} can be used. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using diff --git a/man/details_linear_reg_glm.Rd b/man/details_linear_reg_glm.Rd index cd3045462..a89f6cde0 100644 --- a/man/details_linear_reg_glm.Rd +++ b/man/details_linear_reg_glm.Rd @@ -81,6 +81,22 @@ give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM.” } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_linear_reg_glmer.Rd b/man/details_linear_reg_glmer.Rd index 88ac4854a..2c6c1fbef 100644 --- a/man/details_linear_reg_glmer.Rd +++ b/man/details_linear_reg_glmer.Rd @@ -126,6 +126,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_linear_reg_glmnet.Rd b/man/details_linear_reg_glmnet.Rd index 6b3e31ece..b88072384 100644 --- a/man/details_linear_reg_glmnet.Rd +++ b/man/details_linear_reg_glmnet.Rd @@ -68,6 +68,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_linear_reg_gls.Rd b/man/details_linear_reg_gls.Rd index 4d6c9b207..e71b093c4 100644 --- a/man/details_linear_reg_gls.Rd +++ b/man/details_linear_reg_gls.Rd @@ -107,6 +107,21 @@ fit(gls_wflow, data = riesby) The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gls") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_linear_reg_h2o.Rd b/man/details_linear_reg_h2o.Rd index a53190643..c606094d7 100644 --- a/man/details_linear_reg_h2o.Rd +++ b/man/details_linear_reg_h2o.Rd @@ -71,6 +71,21 @@ By default, \code{\link[h2o:h2o.glm]{h2o::h2o.glm()}} uses the argument \code{standardize = TRUE} to center and scale the data. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_linear_reg_keras.Rd b/man/details_linear_reg_keras.Rd index f0b983492..4ffcc5ce6 100644 --- a/man/details_linear_reg_keras.Rd +++ b/man/details_linear_reg_keras.Rd @@ -60,6 +60,20 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_linear_reg_lm.Rd b/man/details_linear_reg_lm.Rd index 009bd5ed3..39e87525d 100644 --- a/man/details_linear_reg_lm.Rd +++ b/man/details_linear_reg_lm.Rd @@ -64,6 +64,23 @@ Depending on your application, the degrees of freedom for the model (and other statistics) might be incorrect. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lm") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_linear_reg_lme.Rd b/man/details_linear_reg_lme.Rd index 1fb6310bb..e72ebbb90 100644 --- a/man/details_linear_reg_lme.Rd +++ b/man/details_linear_reg_lme.Rd @@ -115,6 +115,21 @@ fit(lme_wflow, data = riesby) The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lme") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_linear_reg_lmer.Rd b/man/details_linear_reg_lmer.Rd index 4adf0ad2b..1afd8ede6 100644 --- a/man/details_linear_reg_lmer.Rd +++ b/man/details_linear_reg_lmer.Rd @@ -118,6 +118,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_linear_reg_quantreg.Rd b/man/details_linear_reg_quantreg.Rd index 1687abb67..82df7095e 100644 --- a/man/details_linear_reg_quantreg.Rd +++ b/man/details_linear_reg_quantreg.Rd @@ -138,6 +138,20 @@ formula method via \code{\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "quantreg") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 1 x 2 +## mode type +## +## 1 quantile regression quantile +}\if{html}{\out{
}} +} + \subsection{Case weights}{ This model can utilize case weights during model fitting. To use them, diff --git a/man/details_linear_reg_spark.Rd b/man/details_linear_reg_spark.Rd index 62821996d..fe0b3375b 100644 --- a/man/details_linear_reg_spark.Rd +++ b/man/details_linear_reg_spark.Rd @@ -77,6 +77,20 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +}\if{html}{\out{
}} +} + \subsection{Other details}{ For models created using the \code{"spark"} engine, there are several things diff --git a/man/details_linear_reg_stan.Rd b/man/details_linear_reg_stan.Rd index 787cefed2..dd0250ce2 100644 --- a/man/details_linear_reg_stan.Rd +++ b/man/details_linear_reg_stan.Rd @@ -83,6 +83,23 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_linear_reg_stan_glmer.Rd b/man/details_linear_reg_stan_glmer.Rd index 0c15a8b27..8c22fe291 100644 --- a/man/details_linear_reg_stan_glmer.Rd +++ b/man/details_linear_reg_stan_glmer.Rd @@ -144,6 +144,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression pred_int +## 3 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item McElreath, R. 2020 \emph{Statistical Rethinking}. CRC Press. diff --git a/man/details_logistic_reg_LiblineaR.Rd b/man/details_logistic_reg_LiblineaR.Rd index fa2bcc245..780ea01ed 100644 --- a/man/details_logistic_reg_LiblineaR.Rd +++ b/man/details_logistic_reg_LiblineaR.Rd @@ -61,6 +61,22 @@ center and scale each so that each predictor has mean zero and a variance of one. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_logistic_reg_brulee.Rd b/man/details_logistic_reg_brulee.Rd index 4d0f03355..130bc8bd1 100644 --- a/man/details_logistic_reg_brulee.Rd +++ b/man/details_logistic_reg_brulee.Rd @@ -76,6 +76,21 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_logistic_reg_gee.Rd b/man/details_logistic_reg_gee.Rd index 2f31fd93d..c60af8443 100644 --- a/man/details_logistic_reg_gee.Rd +++ b/man/details_logistic_reg_gee.Rd @@ -105,6 +105,22 @@ that \code{predict()} can be used. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using diff --git a/man/details_logistic_reg_glm.Rd b/man/details_logistic_reg_glm.Rd index e67400c26..fdf38cc23 100644 --- a/man/details_logistic_reg_glm.Rd +++ b/man/details_logistic_reg_glm.Rd @@ -81,6 +81,23 @@ give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM.” } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +## 4 classification conf_int +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_logistic_reg_glmer.Rd b/man/details_logistic_reg_glmer.Rd index 276269483..58ead423e 100644 --- a/man/details_logistic_reg_glmer.Rd +++ b/man/details_logistic_reg_glmer.Rd @@ -118,6 +118,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_logistic_reg_glmnet.Rd b/man/details_logistic_reg_glmnet.Rd index 6f70072d5..59ce5f8a7 100644 --- a/man/details_logistic_reg_glmnet.Rd +++ b/man/details_logistic_reg_glmnet.Rd @@ -73,6 +73,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_logistic_reg_h2o.Rd b/man/details_logistic_reg_h2o.Rd index e88d8d03d..8ed5b69ac 100644 --- a/man/details_logistic_reg_h2o.Rd +++ b/man/details_logistic_reg_h2o.Rd @@ -90,6 +90,21 @@ By default, \code{\link[h2o:h2o.glm]{h2o::h2o.glm()}} uses the argument \code{standardize = TRUE} to center and scale all numeric columns. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_logistic_reg_keras.Rd b/man/details_logistic_reg_keras.Rd index 28ca17300..63caccbed 100644 --- a/man/details_logistic_reg_keras.Rd +++ b/man/details_logistic_reg_keras.Rd @@ -62,6 +62,21 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ Models fitted with this engine may require native serialization methods diff --git a/man/details_logistic_reg_spark.Rd b/man/details_logistic_reg_spark.Rd index 886310ab3..8be5e19b9 100644 --- a/man/details_logistic_reg_spark.Rd +++ b/man/details_logistic_reg_spark.Rd @@ -79,6 +79,21 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ For models created using the \code{"spark"} engine, there are several things diff --git a/man/details_logistic_reg_stan.Rd b/man/details_logistic_reg_stan.Rd index ed62457e8..66e8af922 100644 --- a/man/details_logistic_reg_stan.Rd +++ b/man/details_logistic_reg_stan.Rd @@ -84,6 +84,24 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +## 4 classification conf_int +## 5 classification pred_int +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_logistic_reg_stan_glmer.Rd b/man/details_logistic_reg_stan_glmer.Rd index 71e16b07b..15d23c3a5 100644 --- a/man/details_logistic_reg_stan_glmer.Rd +++ b/man/details_logistic_reg_stan_glmer.Rd @@ -143,6 +143,24 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification conf_int +## 4 classification pred_int +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item McElreath, R. 2020 \emph{Statistical Rethinking}. CRC Press. diff --git a/man/details_mars_earth.Rd b/man/details_mars_earth.Rd index 75e7c7ee3..1d621761b 100644 --- a/man/details_mars_earth.Rd +++ b/man/details_mars_earth.Rd @@ -97,6 +97,23 @@ Note that the \code{earth} package documentation has: “In the current implementation, \emph{building models with weights can be slow}.” } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mars_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_mlp_brulee.Rd b/man/details_mlp_brulee.Rd index 829025152..e550dd16b 100644 --- a/man/details_mlp_brulee.Rd +++ b/man/details_mlp_brulee.Rd @@ -132,6 +132,22 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_mlp_brulee_two_layer.Rd b/man/details_mlp_brulee_two_layer.Rd index 89f943714..ffd39d918 100644 --- a/man/details_mlp_brulee_two_layer.Rd +++ b/man/details_mlp_brulee_two_layer.Rd @@ -148,6 +148,22 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee_two_layer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_mlp_h2o.Rd b/man/details_mlp_h2o.Rd index 9b82c34f1..105e2c62f 100644 --- a/man/details_mlp_h2o.Rd +++ b/man/details_mlp_h2o.Rd @@ -139,6 +139,23 @@ the argument \code{standardize = TRUE} to center and scale all numeric columns. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_mlp_keras.Rd b/man/details_mlp_keras.Rd index 4a8fc0070..fa29cc071 100644 --- a/man/details_mlp_keras.Rd +++ b/man/details_mlp_keras.Rd @@ -102,6 +102,24 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ Models fitted with this engine may require native serialization methods diff --git a/man/details_mlp_nnet.Rd b/man/details_mlp_nnet.Rd index ab4f51cab..0580a8298 100644 --- a/man/details_mlp_nnet.Rd +++ b/man/details_mlp_nnet.Rd @@ -97,6 +97,24 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_multinom_reg_brulee.Rd b/man/details_multinom_reg_brulee.Rd index ad46d4a92..24c3597b8 100644 --- a/man/details_multinom_reg_brulee.Rd +++ b/man/details_multinom_reg_brulee.Rd @@ -75,6 +75,21 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_multinom_reg_glmnet.Rd b/man/details_multinom_reg_glmnet.Rd index 4ff5db0c9..61e2ddecf 100644 --- a/man/details_multinom_reg_glmnet.Rd +++ b/man/details_multinom_reg_glmnet.Rd @@ -79,6 +79,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_multinom_reg_h2o.Rd b/man/details_multinom_reg_h2o.Rd index 6d3a434a8..43557fdc7 100644 --- a/man/details_multinom_reg_h2o.Rd +++ b/man/details_multinom_reg_h2o.Rd @@ -72,6 +72,21 @@ By default, \code{\link[h2o:h2o.glm]{h2o::h2o.glm()}} uses the argument \code{standardize = TRUE} to center and scale the data. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_multinom_reg_keras.Rd b/man/details_multinom_reg_keras.Rd index 694b705d9..daa5f7bf1 100644 --- a/man/details_multinom_reg_keras.Rd +++ b/man/details_multinom_reg_keras.Rd @@ -61,6 +61,21 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ Models fitted with this engine may require native serialization methods diff --git a/man/details_multinom_reg_nnet.Rd b/man/details_multinom_reg_nnet.Rd index 9da58f82b..109bdb5a1 100644 --- a/man/details_multinom_reg_nnet.Rd +++ b/man/details_multinom_reg_nnet.Rd @@ -52,6 +52,22 @@ center and scale each so that each predictor has mean zero and a variance of one. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_multinom_reg_spark.Rd b/man/details_multinom_reg_spark.Rd index 82804f070..b788dacc9 100644 --- a/man/details_multinom_reg_spark.Rd +++ b/man/details_multinom_reg_spark.Rd @@ -78,6 +78,21 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ For models created using the \code{"spark"} engine, there are several things diff --git a/man/details_naive_Bayes_h2o.Rd b/man/details_naive_Bayes_h2o.Rd index a7e6fb18a..d1a5ff565 100644 --- a/man/details_naive_Bayes_h2o.Rd +++ b/man/details_naive_Bayes_h2o.Rd @@ -57,6 +57,21 @@ The \strong{agua} extension package is required to fit this model. }\if{html}{\out{
}} } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_naive_Bayes_klaR.Rd b/man/details_naive_Bayes_klaR.Rd index 4a912f421..df0d2fb63 100644 --- a/man/details_naive_Bayes_klaR.Rd +++ b/man/details_naive_Bayes_klaR.Rd @@ -63,6 +63,22 @@ before fitting the model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "klaR") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_naive_Bayes_naivebayes.Rd b/man/details_naive_Bayes_naivebayes.Rd index f39b9c2a5..664eab5b2 100644 --- a/man/details_naive_Bayes_naivebayes.Rd +++ b/man/details_naive_Bayes_naivebayes.Rd @@ -66,6 +66,21 @@ before fitting the model. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "naivebayes") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_nearest_neighbor_kknn.Rd b/man/details_nearest_neighbor_kknn.Rd index b25485316..d6e3706a4 100644 --- a/man/details_nearest_neighbor_kknn.Rd +++ b/man/details_nearest_neighbor_kknn.Rd @@ -104,6 +104,23 @@ for \code{nearest_neighbor()} with the \code{"kknn"} engine. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("nearest_neighbor_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_pls_mixOmics.Rd b/man/details_pls_mixOmics.Rd index 3cb9ec41b..6f6cde014 100644 --- a/man/details_pls_mixOmics.Rd +++ b/man/details_pls_mixOmics.Rd @@ -117,6 +117,23 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("pls_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Rohart F and Gautier B and Singh A and Le Cao K-A (2017). “mixOmics: diff --git a/man/details_poisson_reg_gee.Rd b/man/details_poisson_reg_gee.Rd index 2c1f9e5e8..a6d8028a7 100644 --- a/man/details_poisson_reg_gee.Rd +++ b/man/details_poisson_reg_gee.Rd @@ -102,6 +102,21 @@ to \code{glm()} is needed to get the rank and QR decomposition objects so that \code{predict()} can be used. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using diff --git a/man/details_poisson_reg_glm.Rd b/man/details_poisson_reg_glm.Rd index 565786c06..e730c2d3a 100644 --- a/man/details_poisson_reg_glm.Rd +++ b/man/details_poisson_reg_glm.Rd @@ -76,6 +76,21 @@ If frequency weights are being used in your application, the more appropriate. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_poisson_reg_glmer.Rd b/man/details_poisson_reg_glmer.Rd index a6c1f723f..c19529663 100644 --- a/man/details_poisson_reg_glmer.Rd +++ b/man/details_poisson_reg_glmer.Rd @@ -117,6 +117,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item J Pinheiro, and D Bates. 2000. \emph{Mixed-effects models in S and S-PLUS}. diff --git a/man/details_poisson_reg_glmnet.Rd b/man/details_poisson_reg_glmnet.Rd index e1b94bc5e..b80798b57 100644 --- a/man/details_poisson_reg_glmnet.Rd +++ b/man/details_poisson_reg_glmnet.Rd @@ -76,6 +76,21 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_poisson_reg_h2o.Rd b/man/details_poisson_reg_h2o.Rd index c69b3f722..03fa44615 100644 --- a/man/details_poisson_reg_h2o.Rd +++ b/man/details_poisson_reg_h2o.Rd @@ -76,6 +76,21 @@ By default, \code{h2o::h2o.glm()} uses the argument \code{standardize = TRUE} to center and scale all numerical columns. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_poisson_reg_hurdle.Rd b/man/details_poisson_reg_hurdle.Rd index fe287df6f..6d67b7d16 100644 --- a/man/details_poisson_reg_hurdle.Rd +++ b/man/details_poisson_reg_hurdle.Rd @@ -123,5 +123,20 @@ on \code{tidymodels.org}. The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } + +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "hurdle") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} } \keyword{internal} diff --git a/man/details_poisson_reg_stan.Rd b/man/details_poisson_reg_stan.Rd index f7aa7a58b..c128d54bf 100644 --- a/man/details_poisson_reg_stan.Rd +++ b/man/details_poisson_reg_stan.Rd @@ -86,6 +86,23 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_poisson_reg_stan_glmer.Rd b/man/details_poisson_reg_stan_glmer.Rd index 181c7d5b5..095914de4 100644 --- a/man/details_poisson_reg_stan_glmer.Rd +++ b/man/details_poisson_reg_stan_glmer.Rd @@ -142,6 +142,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression pred_int +## 3 regression raw +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item McElreath, R. 2020 \emph{Statistical Rethinking}. CRC Press. diff --git a/man/details_poisson_reg_zeroinfl.Rd b/man/details_poisson_reg_zeroinfl.Rd index 03b999c1c..85d2fd34c 100644 --- a/man/details_poisson_reg_zeroinfl.Rd +++ b/man/details_poisson_reg_zeroinfl.Rd @@ -124,5 +124,20 @@ on \code{tidymodels.org}. The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } + +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "zeroinfl") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +}\if{html}{\out{
}} +} } \keyword{internal} diff --git a/man/details_proportional_hazards_survival.Rd b/man/details_proportional_hazards_survival.Rd index 9a5c334e4..3e3b91c32 100644 --- a/man/details_proportional_hazards_survival.Rd +++ b/man/details_proportional_hazards_survival.Rd @@ -128,6 +128,22 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("proportional_hazards_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression survival +## 3 censored regression linear_pred +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Andersen P, Gill R. 1982. Cox’s regression model for counting diff --git a/man/details_rand_forest_aorsf.Rd b/man/details_rand_forest_aorsf.Rd index e55532a45..6ccb4d7d6 100644 --- a/man/details_rand_forest_aorsf.Rd +++ b/man/details_rand_forest_aorsf.Rd @@ -115,6 +115,26 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "aorsf") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 7 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression survival +## 3 classification class +## 4 classification prob +## 5 classification raw +## 6 regression numeric +## # i 1 more row +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of survival probability at a time exceeding the maximum diff --git a/man/details_rand_forest_h2o.Rd b/man/details_rand_forest_h2o.Rd index ec02e468d..631f9d383 100644 --- a/man/details_rand_forest_h2o.Rd +++ b/man/details_rand_forest_h2o.Rd @@ -96,6 +96,23 @@ Categorical predictors can be partitioned into groups of factor levels are not required for this model. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +}\if{html}{\out{
}} +} + \subsection{Initializing h2o}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_rand_forest_partykit.Rd b/man/details_rand_forest_partykit.Rd index 78578b45b..4af378e97 100644 --- a/man/details_rand_forest_partykit.Rd +++ b/man/details_rand_forest_partykit.Rd @@ -100,6 +100,24 @@ Categorical predictors can be partitioned into groups of factor levels are not required for this model. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression survival +## 3 regression numeric +## 4 classification class +## 5 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ Predictions of type \code{"time"} are predictions of the median survival diff --git a/man/details_rand_forest_randomForest.Rd b/man/details_rand_forest_randomForest.Rd index 51fac3c40..db1a506bd 100644 --- a/man/details_rand_forest_randomForest.Rd +++ b/man/details_rand_forest_randomForest.Rd @@ -104,6 +104,24 @@ size of the saved object might be substantially reduced by using functions from the \href{https://butcher.tidymodels.org}{butcher} package. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "randomForest") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_rand_forest_ranger.Rd b/man/details_rand_forest_ranger.Rd index 4b47392ff..3782ec83e 100644 --- a/man/details_rand_forest_ranger.Rd +++ b/man/details_rand_forest_ranger.Rd @@ -143,6 +143,26 @@ size of the saved object might be substantially reduced by using functions from the \href{https://butcher.tidymodels.org}{butcher} package. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "ranger") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 7 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification conf_int +## 4 classification raw +## 5 regression numeric +## 6 regression conf_int +## # i 1 more row +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_rand_forest_spark.Rd b/man/details_rand_forest_spark.Rd index 2645e0c0e..6c5ee7fcc 100644 --- a/man/details_rand_forest_spark.Rd +++ b/man/details_rand_forest_spark.Rd @@ -126,6 +126,22 @@ Note that, for spark engines, the \code{case_weight} argument value should be a character string to specify the column with the numeric case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Kuhn, M, and K Johnson. 2013. \emph{Applied Predictive Modeling}. Springer. diff --git a/man/details_rule_fit_h2o.Rd b/man/details_rule_fit_h2o.Rd index e029b4852..3d1237035 100644 --- a/man/details_rule_fit_h2o.Rd +++ b/man/details_rule_fit_h2o.Rd @@ -112,6 +112,23 @@ formula method via \code{\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +}\if{html}{\out{
}} +} + \subsection{Other details}{ To use the h2o engine with tidymodels, please run \code{h2o::h2o.init()} diff --git a/man/details_rule_fit_xrf.Rd b/man/details_rule_fit_xrf.Rd index 29e941abb..19571a02d 100644 --- a/man/details_rule_fit_xrf.Rd +++ b/man/details_rule_fit_xrf.Rd @@ -200,6 +200,22 @@ converted to \code{trees - 1} and a warning is issued. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "xrf") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Friedman and Popescu. “Predictive learning via rule ensembles.” Ann. diff --git a/man/details_survival_reg_flexsurv.Rd b/man/details_survival_reg_flexsurv.Rd index 4432df009..213ba8d6b 100644 --- a/man/details_survival_reg_flexsurv.Rd +++ b/man/details_survival_reg_flexsurv.Rd @@ -73,6 +73,24 @@ size of the saved object might be substantially reduced by using functions from the \href{https://butcher.tidymodels.org}{butcher} package. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurv") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +}\if{html}{\out{
}} +} + \subsection{References}{ \itemize{ \item Jackson, C. 2016. \code{flexsurv}: A Platform for Parametric Survival diff --git a/man/details_survival_reg_flexsurvspline.Rd b/man/details_survival_reg_flexsurvspline.Rd index a58ebe7f2..c3f7da445 100644 --- a/man/details_survival_reg_flexsurvspline.Rd +++ b/man/details_survival_reg_flexsurvspline.Rd @@ -62,6 +62,24 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurvspline") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_survival_reg_survival.Rd b/man/details_survival_reg_survival.Rd index e938407de..b6c25b2c9 100644 --- a/man/details_survival_reg_survival.Rd +++ b/man/details_survival_reg_survival.Rd @@ -98,6 +98,24 @@ The \code{fit()} and \code{fit_xy()} arguments have arguments called \code{case_weights} that expect vectors of case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/details_svm_linear_LiblineaR.Rd b/man/details_svm_linear_LiblineaR.Rd index 59fc6ff81..ac765a9ed 100644 --- a/man/details_svm_linear_LiblineaR.Rd +++ b/man/details_svm_linear_LiblineaR.Rd @@ -99,6 +99,23 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification raw +}\if{html}{\out{
}} +} + \subsection{Sparse Data}{ This model can utilize sparse data during model fitting and prediction. diff --git a/man/details_svm_linear_kernlab.Rd b/man/details_svm_linear_kernlab.Rd index 309434cec..1af017de6 100644 --- a/man/details_svm_linear_kernlab.Rd +++ b/man/details_svm_linear_kernlab.Rd @@ -94,6 +94,23 @@ variance of one. \subsection{Case weights}{ The underlying model implementation does not allow for case weights. + +j## Prediction types + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "kernlab") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} } \subsection{Saving fitted model objects}{ diff --git a/man/details_svm_poly_kernlab.Rd b/man/details_svm_poly_kernlab.Rd index 49bfa0df2..bc736d652 100644 --- a/man/details_svm_poly_kernlab.Rd +++ b/man/details_svm_poly_kernlab.Rd @@ -108,6 +108,23 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("svm_poly_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} + \subsection{Examples}{ The “Fitting and Predicting with parsnip” article contains diff --git a/man/details_svm_rbf_kernlab.Rd b/man/details_svm_rbf_kernlab.Rd index 18eef119c..897538684 100644 --- a/man/details_svm_rbf_kernlab.Rd +++ b/man/details_svm_rbf_kernlab.Rd @@ -108,6 +108,25 @@ variance of one. The underlying model implementation does not allow for case weights. } +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("svm_rbf_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 10 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +## 6 regression numeric +## # i 4 more rows +}\if{html}{\out{
}} +} + \subsection{Saving fitted model objects}{ This model object contains data that are not required to make diff --git a/man/null_model.Rd b/man/null_model.Rd index e89962bf3..a285b2361 100644 --- a/man/null_model.Rd +++ b/man/null_model.Rd @@ -61,6 +61,23 @@ call. For this type of model, the template of the fit calls are below: ## parsnip::nullmodel(x = missing_arg(), y = missing_arg()) }\if{html}{\out{}} } + +\subsection{Prediction types}{ + +\if{html}{\out{
}}\preformatted{parsnip:::get_from_env("null_model_predict") |> + dplyr::select(mode, type) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +}\if{html}{\out{
}} +} } \examples{ diff --git a/man/rmd/.gitignore b/man/rmd/.gitignore new file mode 100644 index 000000000..ad293093b --- /dev/null +++ b/man/rmd/.gitignore @@ -0,0 +1,2 @@ +/.quarto/ +**/*.quarto_ipynb diff --git a/man/rmd/C5_rules_C5.0.Rmd b/man/rmd/C5_rules_C5.0.Rmd index ab5b70f9c..44f18208f 100644 --- a/man/rmd/C5_rules_C5.0.Rmd +++ b/man/rmd/C5_rules_C5.0.Rmd @@ -60,6 +60,16 @@ C5_rules( #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("C5_rules_predict") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/C5_rules_C5.0.md b/man/rmd/C5_rules_C5.0.md index a405677b3..900b429e5 100644 --- a/man/rmd/C5_rules_C5.0.md +++ b/man/rmd/C5_rules_C5.0.md @@ -58,6 +58,22 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("C5_rules_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Saving fitted model objects diff --git a/man/rmd/aaa.md b/man/rmd/aaa.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/man/rmd/aaa.md @@ -0,0 +1 @@ + diff --git a/man/rmd/auto_ml_h2o.Rmd b/man/rmd/auto_ml_h2o.Rmd index 312f29ac6..ad86d9ba6 100644 --- a/man/rmd/auto_ml_h2o.Rmd +++ b/man/rmd/auto_ml_h2o.Rmd @@ -23,9 +23,12 @@ Engine arguments of interest ```{r} #| label: h2o-reg -auto_ml() |> - set_engine("h2o") |> - set_mode("regression") |> + +library(agua) + +auto_ml() |> + set_engine("h2o") |> + set_mode("regression") |> translate() ``` @@ -52,6 +55,16 @@ auto_ml() |> #| child: template-h2o-init.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("auto_ml_predict") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/auto_ml_h2o.md b/man/rmd/auto_ml_h2o.md index 6c46295c1..e45185e95 100644 --- a/man/rmd/auto_ml_h2o.md +++ b/man/rmd/auto_ml_h2o.md @@ -21,9 +21,11 @@ Engine arguments of interest ``` r -auto_ml() |> - set_engine("h2o") |> - set_mode("regression") |> +library(agua) + +auto_ml() |> + set_engine("h2o") |> + set_mode("regression") |> translate() ``` @@ -72,6 +74,24 @@ You can control the number of threads in the thread pool used by h2o with the `n h2o will automatically shut down the local h2o instance started by R when R is terminated. To manually stop the h2o server, run `h2o::h2o.shutdown()`. +## Prediction types + + +``` r +parsnip:::get_from_env("auto_ml_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +``` + ## Saving fitted model objects diff --git a/man/rmd/bag_mars_earth.Rmd b/man/rmd/bag_mars_earth.Rmd index ba9c6999d..ac2a59f27 100644 --- a/man/rmd/bag_mars_earth.Rmd +++ b/man/rmd/bag_mars_earth.Rmd @@ -75,6 +75,16 @@ bag_mars( Note that the `earth` package documentation has: "In the current implementation, _building models with weights can be slow_." +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::select(mode, type) + +``` + ## References - Breiman, L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140 diff --git a/man/rmd/bag_mars_earth.md b/man/rmd/bag_mars_earth.md index 1ae7761ae..477fe93c5 100644 --- a/man/rmd/bag_mars_earth.md +++ b/man/rmd/bag_mars_earth.md @@ -93,6 +93,23 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that the `earth` package documentation has: "In the current implementation, _building models with weights can be slow_." +## Prediction types + + +``` r +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## References - Breiman, L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140 diff --git a/man/rmd/bag_mlp_nnet.Rmd b/man/rmd/bag_mlp_nnet.Rmd index dbc81769f..bf6a757b0 100644 --- a/man/rmd/bag_mlp_nnet.Rmd +++ b/man/rmd/bag_mlp_nnet.Rmd @@ -78,6 +78,16 @@ bag_mlp(penalty = double(1), hidden_units = integer(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("bag_mlp_predict") |> + dplyr::select(mode, type) + +``` + ## References diff --git a/man/rmd/bag_mlp_nnet.md b/man/rmd/bag_mlp_nnet.md index 36b36b951..5673e1800 100644 --- a/man/rmd/bag_mlp_nnet.md +++ b/man/rmd/bag_mlp_nnet.md @@ -91,6 +91,23 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("bag_mlp_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## References diff --git a/man/rmd/bag_tree_C5.0.Rmd b/man/rmd/bag_tree_C5.0.Rmd index b4e5aa5d7..ce52ab61a 100644 --- a/man/rmd/bag_tree_C5.0.Rmd +++ b/man/rmd/bag_tree_C5.0.Rmd @@ -56,6 +56,16 @@ bag_tree(min_n = integer()) |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) + +``` ## References diff --git a/man/rmd/bag_tree_C5.0.md b/man/rmd/bag_tree_C5.0.md index 9a4360bbd..49426d718 100644 --- a/man/rmd/bag_tree_C5.0.md +++ b/man/rmd/bag_tree_C5.0.md @@ -51,6 +51,19 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 0 x 2 +## # i 2 variables: mode , type +``` ## References diff --git a/man/rmd/bag_tree_rpart.Rmd b/man/rmd/bag_tree_rpart.Rmd index be5c0dea7..f27ab27b2 100644 --- a/man/rmd/bag_tree_rpart.Rmd +++ b/man/rmd/bag_tree_rpart.Rmd @@ -89,6 +89,17 @@ bag_tree(tree_depth = integer(1), min_n = integer(1), cost_complexity = double(1 #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/bag_tree_rpart.md b/man/rmd/bag_tree_rpart.md index ced2b2df3..6a324d85c 100644 --- a/man/rmd/bag_tree_rpart.md +++ b/man/rmd/bag_tree_rpart.md @@ -124,6 +124,20 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("bag_mars_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 0 x 2 +## # i 2 variables: mode , type +``` + ## Other details diff --git a/man/rmd/bart_dbarts.Rmd b/man/rmd/bart_dbarts.Rmd index 95a737800..af8c46ec6 100644 --- a/man/rmd/bart_dbarts.Rmd +++ b/man/rmd/bart_dbarts.Rmd @@ -93,6 +93,16 @@ parsnip::bart( [dbarts::bart()] will also convert the factors to indicators if the user does not create them first. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("bart_predict") |> + dplyr::select(mode, type) |> + print(n = Inf) + +``` ## References diff --git a/man/rmd/bart_dbarts.md b/man/rmd/bart_dbarts.md index 1d9f0ab04..e9f2fbd37 100644 --- a/man/rmd/bart_dbarts.md +++ b/man/rmd/bart_dbarts.md @@ -111,6 +111,29 @@ Factor/categorical predictors need to be converted to numeric values (e.g., dumm [dbarts::bart()] will also convert the factors to indicators if the user does not create them first. +## Prediction types + + +``` r +parsnip:::get_from_env("bart_predict") |> + dplyr::select(mode, type) |> + print(n = Inf) +``` + +``` +## # A tibble: 9 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 regression conf_int +## 4 regression pred_int +## 5 classification class +## 6 classification prob +## 7 classification conf_int +## 8 classification pred_int +## 9 classification raw +``` ## References diff --git a/man/rmd/boost_tree_C5.0.Rmd b/man/rmd/boost_tree_C5.0.Rmd index 9ce9ee06b..61fbfc0ae 100644 --- a/man/rmd/boost_tree_C5.0.Rmd +++ b/man/rmd/boost_tree_C5.0.Rmd @@ -56,6 +56,17 @@ boost_tree(trees = integer(), min_n = integer(), sample_size = numeric()) |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/boost_tree_C5.0.md b/man/rmd/boost_tree_C5.0.md index 1a779a797..6faaf12e2 100644 --- a/man/rmd/boost_tree_C5.0.md +++ b/man/rmd/boost_tree_C5.0.md @@ -56,6 +56,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/boost_tree_h2o.Rmd b/man/rmd/boost_tree_h2o.Rmd index 467d09b63..c00be3dba 100644 --- a/man/rmd/boost_tree_h2o.Rmd +++ b/man/rmd/boost_tree_h2o.Rmd @@ -82,6 +82,17 @@ Non-numeric predictors (i.e., factors) are internally converted to numeric. In t #| child: template-mtry-prop.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(stringr::str_starts(engine, "h2o")) |> + dplyr::select(mode, type) |> + print(n = Inf) +``` + ## Initializing h2o ```{r} diff --git a/man/rmd/boost_tree_h2o.md b/man/rmd/boost_tree_h2o.md index d5c7d14d1..6734353e5 100644 --- a/man/rmd/boost_tree_h2o.md +++ b/man/rmd/boost_tree_h2o.md @@ -124,6 +124,30 @@ parsnip and its extensions accommodate this parameterization using the `counts` `mtry` is a main model argument for \\code{\\link[=boost_tree]{boost_tree()}} and \\code{\\link[=rand_forest]{rand_forest()}}, and thus should not have an engine-specific interface. So, regardless of engine, `counts` defaults to `TRUE`. For engines that support the proportion interpretation (currently `"xgboost"` and `"xrf"`, via the rules package, and `"lightgbm"` via the bonsai package) the user can pass the `counts = FALSE` argument to `set_engine()` to supply `mtry` values within `[0, 1]`. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(stringr::str_starts(engine, "h2o")) |> + dplyr::select(mode, type) |> + print(n = Inf) +``` + +``` +## # A tibble: 8 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 regression numeric +## 6 regression raw +## 7 classification class +## 8 classification prob +``` + ## Initializing h2o diff --git a/man/rmd/boost_tree_lightgbm.Rmd b/man/rmd/boost_tree_lightgbm.Rmd index 70993c46e..2b51dcf45 100644 --- a/man/rmd/boost_tree_lightgbm.Rmd +++ b/man/rmd/boost_tree_lightgbm.Rmd @@ -85,6 +85,17 @@ Non-numeric predictors (i.e., factors) are internally converted to numeric. In t #| child: template-mtry-prop.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "lightgbm") |> + dplyr::select(mode, type) + +``` + ### Bagging The `sample_size` argument is translated to the `bagging_fraction` parameter in the `param` argument of `lgb.train`. The argument is interpreted by lightgbm as a _proportion_ rather than a count, so bonsai internally reparameterizes the `sample_size` argument with [dials::sample_prop()] during tuning. diff --git a/man/rmd/boost_tree_lightgbm.md b/man/rmd/boost_tree_lightgbm.md index 46d59deb0..d0b0ec229 100644 --- a/man/rmd/boost_tree_lightgbm.md +++ b/man/rmd/boost_tree_lightgbm.md @@ -123,6 +123,25 @@ parsnip and its extensions accommodate this parameterization using the `counts` `mtry` is a main model argument for \\code{\\link[=boost_tree]{boost_tree()}} and \\code{\\link[=rand_forest]{rand_forest()}}, and thus should not have an engine-specific interface. So, regardless of engine, `counts` defaults to `TRUE`. For engines that support the proportion interpretation (currently `"xgboost"` and `"xrf"`, via the rules package, and `"lightgbm"` via the bonsai package) the user can pass the `counts = FALSE` argument to `set_engine()` to supply `mtry` values within `[0, 1]`. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "lightgbm") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +## 4 classification raw +``` + ### Bagging The `sample_size` argument is translated to the `bagging_fraction` parameter in the `param` argument of `lgb.train`. The argument is interpreted by lightgbm as a _proportion_ rather than a count, so bonsai internally reparameterizes the `sample_size` argument with [dials::sample_prop()] during tuning. diff --git a/man/rmd/boost_tree_mboost.Rmd b/man/rmd/boost_tree_mboost.Rmd index 41d547a8d..794931434 100644 --- a/man/rmd/boost_tree_mboost.Rmd +++ b/man/rmd/boost_tree_mboost.Rmd @@ -54,6 +54,17 @@ boost_tree() |> #| child: template-tree-split-factors.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "mboost") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/boost_tree_mboost.md b/man/rmd/boost_tree_mboost.md index fa9297df8..a8c51e7ce 100644 --- a/man/rmd/boost_tree_mboost.md +++ b/man/rmd/boost_tree_mboost.md @@ -52,6 +52,24 @@ boost_tree() |> This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "mboost") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 censored regression survival +## 2 censored regression linear_pred +## 3 censored regression time +``` + ## Other details diff --git a/man/rmd/boost_tree_spark.Rmd b/man/rmd/boost_tree_spark.Rmd index c3b3e3c60..101ea275f 100644 --- a/man/rmd/boost_tree_spark.Rmd +++ b/man/rmd/boost_tree_spark.Rmd @@ -73,6 +73,17 @@ boost_tree( Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/boost_tree_spark.md b/man/rmd/boost_tree_spark.md index 0f1934636..47863fea2 100644 --- a/man/rmd/boost_tree_spark.md +++ b/man/rmd/boost_tree_spark.md @@ -109,6 +109,24 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## Other details diff --git a/man/rmd/boost_tree_xgboost.Rmd b/man/rmd/boost_tree_xgboost.Rmd index 0fbcf4dcd..4c8206713 100644 --- a/man/rmd/boost_tree_xgboost.Rmd +++ b/man/rmd/boost_tree_xgboost.Rmd @@ -75,6 +75,17 @@ For classification, non-numeric outcomes (i.e., factors) are internally converte #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "xgboost") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/boost_tree_xgboost.md b/man/rmd/boost_tree_xgboost.md index 4f1ae86d6..25a85e342 100644 --- a/man/rmd/boost_tree_xgboost.md +++ b/man/rmd/boost_tree_xgboost.md @@ -116,6 +116,26 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("boost_tree_predict") |> + dplyr::filter(engine == "xgboost") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Sparse Data diff --git a/man/rmd/cubist_rules_Cubist.Rmd b/man/rmd/cubist_rules_Cubist.Rmd index 29d27c7c3..d62e66b2b 100644 --- a/man/rmd/cubist_rules_Cubist.Rmd +++ b/man/rmd/cubist_rules_Cubist.Rmd @@ -54,6 +54,16 @@ cubist_rules( #| child: template-tree-split-factors.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("cubist_rules_predict") |> + dplyr::select(mode, type) + +``` + ## References - Quinlan R (1992). "Learning with Continuous Classes." Proceedings of the 5th Australian Joint Conference On Artificial Intelligence, pp. 343-348. diff --git a/man/rmd/cubist_rules_Cubist.md b/man/rmd/cubist_rules_Cubist.md index f560559f6..7f5ad1a55 100644 --- a/man/rmd/cubist_rules_Cubist.md +++ b/man/rmd/cubist_rules_Cubist.md @@ -54,6 +54,22 @@ cubist_rules( This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. +## Prediction types + + +``` r +parsnip:::get_from_env("cubist_rules_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - Quinlan R (1992). "Learning with Continuous Classes." Proceedings of the 5th Australian Joint Conference On Artificial Intelligence, pp. 343-348. diff --git a/man/rmd/decision_tree_C5.0.Rmd b/man/rmd/decision_tree_C5.0.Rmd index 4ceb135cd..9dc656b9a 100644 --- a/man/rmd/decision_tree_C5.0.Rmd +++ b/man/rmd/decision_tree_C5.0.Rmd @@ -54,6 +54,17 @@ decision_tree(min_n = integer()) |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/decision_tree_C5.0.md b/man/rmd/decision_tree_C5.0.md index 743e3e369..cad42398b 100644 --- a/man/rmd/decision_tree_C5.0.md +++ b/man/rmd/decision_tree_C5.0.md @@ -48,6 +48,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "C5.0") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/decision_tree_partykit.Rmd b/man/rmd/decision_tree_partykit.Rmd index 3b1438e2d..17b242215 100644 --- a/man/rmd/decision_tree_partykit.Rmd +++ b/man/rmd/decision_tree_partykit.Rmd @@ -89,6 +89,17 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) |> #| child: template-tree-split-factors.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/decision_tree_partykit.md b/man/rmd/decision_tree_partykit.md index 3c53e1833..9d712e4e2 100644 --- a/man/rmd/decision_tree_partykit.md +++ b/man/rmd/decision_tree_partykit.md @@ -1,7 +1,7 @@ -For this engine, there are multiple modes: censored regression, regression, and classification +For this engine, there are multiple modes: regression, classification, and censored regression ## Tuning Parameters @@ -9,10 +9,10 @@ For this engine, there are multiple modes: censored regression, regression, and This model has 2 tuning parameters: -- `tree_depth`: Tree Depth (type: integer, default: see below) - - `min_n`: Minimal Node Size (type: integer, default: 20L) +- `tree_depth`: Tree Depth (type: integer, default: see below) + The `tree_depth` parameter defaults to `0` which means no restrictions are applied to tree depth. An engine-specific parameter for this model is: @@ -115,6 +115,26 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) |> This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. +## Prediction types + + +``` r +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +## 4 censored regression time +## 5 censored regression survival +``` + ## Other details diff --git a/man/rmd/decision_tree_rpart.Rmd b/man/rmd/decision_tree_rpart.Rmd index 798528e22..c764bd3ea 100644 --- a/man/rmd/decision_tree_rpart.Rmd +++ b/man/rmd/decision_tree_rpart.Rmd @@ -82,6 +82,17 @@ decision_tree( #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/decision_tree_rpart.md b/man/rmd/decision_tree_rpart.md index 4d796d156..fa74be863 100644 --- a/man/rmd/decision_tree_rpart.md +++ b/man/rmd/decision_tree_rpart.md @@ -115,6 +115,28 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "rpart") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 7 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +## 6 censored regression time +## # i 1 more row +``` + ## Other details diff --git a/man/rmd/decision_tree_spark.Rmd b/man/rmd/decision_tree_spark.Rmd index 83a3e7b51..82715c752 100644 --- a/man/rmd/decision_tree_spark.Rmd +++ b/man/rmd/decision_tree_spark.Rmd @@ -65,6 +65,17 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) |> Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. + +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` ## Other details ```{r} diff --git a/man/rmd/decision_tree_spark.md b/man/rmd/decision_tree_spark.md index 888f6bfcc..e476f66a6 100644 --- a/man/rmd/decision_tree_spark.md +++ b/man/rmd/decision_tree_spark.md @@ -78,6 +78,24 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. + +## Prediction types + + +``` r +parsnip:::get_from_env("decision_tree_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` ## Other details diff --git a/man/rmd/discrim_flexible_earth.Rmd b/man/rmd/discrim_flexible_earth.Rmd index b0f9c3aea..60279912f 100644 --- a/man/rmd/discrim_flexible_earth.Rmd +++ b/man/rmd/discrim_flexible_earth.Rmd @@ -59,6 +59,16 @@ discrim_flexible( #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_flexible_predict") |> + dplyr::select(mode, type) + +``` + ## References - Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal diff --git a/man/rmd/discrim_flexible_earth.md b/man/rmd/discrim_flexible_earth.md index 12cf61fb6..4b84207d6 100644 --- a/man/rmd/discrim_flexible_earth.md +++ b/man/rmd/discrim_flexible_earth.md @@ -61,6 +61,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_flexible_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal diff --git a/man/rmd/discrim_linear_MASS.Rmd b/man/rmd/discrim_linear_MASS.Rmd index 4aa102c6f..2344eb61e 100644 --- a/man/rmd/discrim_linear_MASS.Rmd +++ b/man/rmd/discrim_linear_MASS.Rmd @@ -38,6 +38,17 @@ discrim_linear() |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/discrim_linear_MASS.md b/man/rmd/discrim_linear_MASS.md index 6be00f4cb..d20c5e8d1 100644 --- a/man/rmd/discrim_linear_MASS.md +++ b/man/rmd/discrim_linear_MASS.md @@ -44,6 +44,24 @@ Variance calculations are used in these computations so _zero-variance_ predicto The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/discrim_linear_mda.Rmd b/man/rmd/discrim_linear_mda.Rmd index 1214f4884..6a5a54364 100644 --- a/man/rmd/discrim_linear_mda.Rmd +++ b/man/rmd/discrim_linear_mda.Rmd @@ -59,6 +59,17 @@ discrim_linear(penalty = numeric(0)) |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "mda") |> + dplyr::select(mode, type) + +``` + ## References - Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal diff --git a/man/rmd/discrim_linear_mda.md b/man/rmd/discrim_linear_mda.md index 448cbf715..7cf0bdf44 100644 --- a/man/rmd/discrim_linear_mda.md +++ b/man/rmd/discrim_linear_mda.md @@ -55,6 +55,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "mda") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal diff --git a/man/rmd/discrim_linear_sda.Rmd b/man/rmd/discrim_linear_sda.Rmd index f2fa333f4..60be43c1c 100644 --- a/man/rmd/discrim_linear_sda.Rmd +++ b/man/rmd/discrim_linear_sda.Rmd @@ -48,6 +48,17 @@ discrim_linear() |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sda") |> + dplyr::select(mode, type) + +``` + ## References - Ahdesmaki, A., and K. Strimmer. 2010. Feature selection in omics prediction problems using cat scores and false non-discovery rate control. Ann. Appl. Stat. 4: 503-519. [Preprint](https://arxiv.org/abs/0903.2003). diff --git a/man/rmd/discrim_linear_sda.md b/man/rmd/discrim_linear_sda.md index 92e7bb503..f1c07be49 100644 --- a/man/rmd/discrim_linear_sda.md +++ b/man/rmd/discrim_linear_sda.md @@ -54,6 +54,24 @@ Variance calculations are used in these computations so _zero-variance_ predicto The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sda") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Ahdesmaki, A., and K. Strimmer. 2010. Feature selection in omics prediction problems using cat scores and false non-discovery rate control. Ann. Appl. Stat. 4: 503-519. [Preprint](https://arxiv.org/abs/0903.2003). diff --git a/man/rmd/discrim_linear_sparsediscrim.Rmd b/man/rmd/discrim_linear_sparsediscrim.Rmd index 9db4408e1..422184304 100644 --- a/man/rmd/discrim_linear_sparsediscrim.Rmd +++ b/man/rmd/discrim_linear_sparsediscrim.Rmd @@ -65,6 +65,17 @@ discrim_linear(regularization_method = character(0)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) + +``` + ## References diff --git a/man/rmd/discrim_linear_sparsediscrim.md b/man/rmd/discrim_linear_sparsediscrim.md index b7efb62f4..9eb942868 100644 --- a/man/rmd/discrim_linear_sparsediscrim.md +++ b/man/rmd/discrim_linear_sparsediscrim.md @@ -59,6 +59,24 @@ Variance calculations are used in these computations so _zero-variance_ predicto The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_linear_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References diff --git a/man/rmd/discrim_quad_MASS.Rmd b/man/rmd/discrim_quad_MASS.Rmd index 54f99ef1c..4889b2272 100644 --- a/man/rmd/discrim_quad_MASS.Rmd +++ b/man/rmd/discrim_quad_MASS.Rmd @@ -38,6 +38,17 @@ discrim_quad() |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/discrim_quad_MASS.md b/man/rmd/discrim_quad_MASS.md index 40d116efb..feddb4e04 100644 --- a/man/rmd/discrim_quad_MASS.md +++ b/man/rmd/discrim_quad_MASS.md @@ -44,6 +44,24 @@ Variance calculations are used in these computations within each outcome class. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "MASS") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/discrim_quad_sparsediscrim.Rmd b/man/rmd/discrim_quad_sparsediscrim.Rmd index 09e965637..df58c151d 100644 --- a/man/rmd/discrim_quad_sparsediscrim.Rmd +++ b/man/rmd/discrim_quad_sparsediscrim.Rmd @@ -64,6 +64,17 @@ discrim_quad(regularization_method = character(0)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) + +``` + ## References - `qda_diag()`: Dudoit, Fridlyand and Speed (2002) Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data, _Journal of the American Statistical Association_, 97:457, 77-87. diff --git a/man/rmd/discrim_quad_sparsediscrim.md b/man/rmd/discrim_quad_sparsediscrim.md index 2d663468c..1285b1763 100644 --- a/man/rmd/discrim_quad_sparsediscrim.md +++ b/man/rmd/discrim_quad_sparsediscrim.md @@ -58,6 +58,24 @@ Variance calculations are used in these computations within each outcome class. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_quad_predict") |> + dplyr::filter(engine == "sparsediscrim") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - `qda_diag()`: Dudoit, Fridlyand and Speed (2002) Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data, _Journal of the American Statistical Association_, 97:457, 77-87. diff --git a/man/rmd/discrim_regularized_klaR.Rmd b/man/rmd/discrim_regularized_klaR.Rmd index ba24b1444..4175baa70 100644 --- a/man/rmd/discrim_regularized_klaR.Rmd +++ b/man/rmd/discrim_regularized_klaR.Rmd @@ -67,6 +67,16 @@ discrim_regularized(frac_identity = numeric(0), frac_common_cov = numeric(0)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("discrim_regularized_predict") |> + dplyr::select(mode, type) + +``` + ## References - Friedman, J (1989). Regularized Discriminant Analysis. _Journal of the American Statistical Association_, 84, 165-175. diff --git a/man/rmd/discrim_regularized_klaR.md b/man/rmd/discrim_regularized_klaR.md index 2708da6ac..113b2edcd 100644 --- a/man/rmd/discrim_regularized_klaR.md +++ b/man/rmd/discrim_regularized_klaR.md @@ -64,6 +64,23 @@ Variance calculations are used in these computations within each outcome class. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("discrim_regularized_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Friedman, J (1989). Regularized Discriminant Analysis. _Journal of the American Statistical Association_, 84, 165-175. diff --git a/man/rmd/gen_additive_mod_mgcv.Rmd b/man/rmd/gen_additive_mod_mgcv.Rmd index e1ff73945..db1efde7b 100644 --- a/man/rmd/gen_additive_mod_mgcv.Rmd +++ b/man/rmd/gen_additive_mod_mgcv.Rmd @@ -99,6 +99,16 @@ To learn more about the differences between these formulas, see [`?model_formula #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("gen_additive_mod_predict") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/gen_additive_mod_mgcv.md b/man/rmd/gen_additive_mod_mgcv.md index 5f714d199..ab1bb8b42 100644 --- a/man/rmd/gen_additive_mod_mgcv.md +++ b/man/rmd/gen_additive_mod_mgcv.md @@ -140,6 +140,27 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("gen_additive_mod_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 7 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression raw +## 4 classification class +## 5 classification prob +## 6 classification raw +## # i 1 more row +``` + ## Saving fitted model objects diff --git a/man/rmd/linear_reg_brulee.Rmd b/man/rmd/linear_reg_brulee.Rmd index 216c2e453..c5f0e3e37 100644 --- a/man/rmd/linear_reg_brulee.Rmd +++ b/man/rmd/linear_reg_brulee.Rmd @@ -67,6 +67,17 @@ linear_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/linear_reg_brulee.md b/man/rmd/linear_reg_brulee.md index e59987884..6e0b26086 100644 --- a/man/rmd/linear_reg_brulee.md +++ b/man/rmd/linear_reg_brulee.md @@ -62,6 +62,22 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/linear_reg_gee.Rmd b/man/rmd/linear_reg_gee.Rmd index b8d559318..e95b56649 100644 --- a/man/rmd/linear_reg_gee.Rmd +++ b/man/rmd/linear_reg_gee.Rmd @@ -79,6 +79,17 @@ Also, because of issues with the `gee()` function, a supplementary call to `glm( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) + +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/linear_reg_gee.md b/man/rmd/linear_reg_gee.md index 025334b70..9ce4deacc 100644 --- a/man/rmd/linear_reg_gee.md +++ b/man/rmd/linear_reg_gee.md @@ -85,6 +85,23 @@ Also, because of issues with the `gee()` function, a supplementary call to `glm( The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/linear_reg_glm.Rmd b/man/rmd/linear_reg_glm.Rmd index c094eb10f..bbbae72df 100644 --- a/man/rmd/linear_reg_glm.Rmd +++ b/man/rmd/linear_reg_glm.Rmd @@ -41,6 +41,17 @@ linear_reg() |> _However_, the documentation in [stats::glm()] assumes that is specific type of case weights are being used:"Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers `w_i`, that each response `y_i` is the mean of `w_i` unit-weight observations. For a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM." +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/linear_reg_glm.md b/man/rmd/linear_reg_glm.md index e35de6ba0..f1da18b71 100644 --- a/man/rmd/linear_reg_glm.md +++ b/man/rmd/linear_reg_glm.md @@ -62,6 +62,24 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e _However_, the documentation in [stats::glm()] assumes that is specific type of case weights are being used:"Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers `w_i`, that each response `y_i` is the mean of `w_i` unit-weight observations. For a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM." +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression raw +``` + ## Saving fitted model objects diff --git a/man/rmd/linear_reg_glmer.Rmd b/man/rmd/linear_reg_glmer.Rmd index ee49e36b0..6d7436056 100644 --- a/man/rmd/linear_reg_glmer.Rmd +++ b/man/rmd/linear_reg_glmer.Rmd @@ -78,6 +78,17 @@ fit(glmer_wflow, data = riesby) #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_glmer.md b/man/rmd/linear_reg_glmer.md index bbea7844b..ca547979a 100644 --- a/man/rmd/linear_reg_glmer.md +++ b/man/rmd/linear_reg_glmer.md @@ -105,6 +105,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_glmnet.Rmd b/man/rmd/linear_reg_glmnet.Rmd index d76ba901b..e0d504b57 100644 --- a/man/rmd/linear_reg_glmnet.Rmd +++ b/man/rmd/linear_reg_glmnet.Rmd @@ -59,6 +59,17 @@ By default, [glmnet::glmnet()] uses the argument `standardize = TRUE` to center #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/linear_reg_glmnet.md b/man/rmd/linear_reg_glmnet.md index dde7e7a30..432e12640 100644 --- a/man/rmd/linear_reg_glmnet.md +++ b/man/rmd/linear_reg_glmnet.md @@ -57,6 +57,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## Sparse Data diff --git a/man/rmd/linear_reg_gls.Rmd b/man/rmd/linear_reg_gls.Rmd index 8576e77c8..811b11383 100644 --- a/man/rmd/linear_reg_gls.Rmd +++ b/man/rmd/linear_reg_gls.Rmd @@ -70,6 +70,17 @@ fit(gls_wflow, data = riesby) #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gls") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_gls.md b/man/rmd/linear_reg_gls.md index fbfa25134..dfc9e8ff7 100644 --- a/man/rmd/linear_reg_gls.md +++ b/man/rmd/linear_reg_gls.md @@ -98,6 +98,23 @@ fit(gls_wflow, data = riesby) The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "gls") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_h2o.Rmd b/man/rmd/linear_reg_h2o.Rmd index 0564e54ac..3b8aeef77 100644 --- a/man/rmd/linear_reg_h2o.Rmd +++ b/man/rmd/linear_reg_h2o.Rmd @@ -58,6 +58,17 @@ linear_reg(penalty = 1, mixture = 0.5) |> By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale the data. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` + ## Initializing h2o ```{r} diff --git a/man/rmd/linear_reg_h2o.md b/man/rmd/linear_reg_h2o.md index 70787595a..7c7d1c46f 100644 --- a/man/rmd/linear_reg_h2o.md +++ b/man/rmd/linear_reg_h2o.md @@ -56,6 +56,23 @@ scale each so that each predictor has mean zero and a variance of one. By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale the data. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## Initializing h2o diff --git a/man/rmd/linear_reg_keras.Rmd b/man/rmd/linear_reg_keras.Rmd index b26ed7b3d..db4bc547a 100644 --- a/man/rmd/linear_reg_keras.Rmd +++ b/man/rmd/linear_reg_keras.Rmd @@ -58,6 +58,17 @@ linear_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-keras) for `linear_reg()` with the `"keras"` engine. diff --git a/man/rmd/linear_reg_keras.md b/man/rmd/linear_reg_keras.md index 35a8850e3..9e9b29045 100644 --- a/man/rmd/linear_reg_keras.md +++ b/man/rmd/linear_reg_keras.md @@ -51,6 +51,22 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-keras) for `linear_reg()` with the `"keras"` engine. diff --git a/man/rmd/linear_reg_lm.Rmd b/man/rmd/linear_reg_lm.Rmd index 9e0670ef8..ddbe35ffc 100644 --- a/man/rmd/linear_reg_lm.Rmd +++ b/man/rmd/linear_reg_lm.Rmd @@ -34,6 +34,17 @@ _However_, the documentation in [stats::lm()] assumes that is specific type of c Depending on your application, the degrees of freedom for the model (and other statistics) might be incorrect. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lm") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/linear_reg_lm.md b/man/rmd/linear_reg_lm.md index c406c8399..fb06027c1 100644 --- a/man/rmd/linear_reg_lm.md +++ b/man/rmd/linear_reg_lm.md @@ -41,6 +41,25 @@ _However_, the documentation in [stats::lm()] assumes that is specific type of c Depending on your application, the degrees of freedom for the model (and other statistics) might be incorrect. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lm") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +``` + ## Saving fitted model objects diff --git a/man/rmd/linear_reg_lme.Rmd b/man/rmd/linear_reg_lme.Rmd index 11f2867ef..139eba43c 100644 --- a/man/rmd/linear_reg_lme.Rmd +++ b/man/rmd/linear_reg_lme.Rmd @@ -70,6 +70,17 @@ fit(lme_wflow, data = riesby) #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lme") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_lme.md b/man/rmd/linear_reg_lme.md index 179d732a4..3ec2c7589 100644 --- a/man/rmd/linear_reg_lme.md +++ b/man/rmd/linear_reg_lme.md @@ -94,6 +94,23 @@ fit(lme_wflow, data = riesby) The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lme") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_lmer.Rmd b/man/rmd/linear_reg_lmer.Rmd index 061a5a187..a8f663c9d 100644 --- a/man/rmd/linear_reg_lmer.Rmd +++ b/man/rmd/linear_reg_lmer.Rmd @@ -70,6 +70,17 @@ fit(lmer_wflow, data = riesby) #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lmer") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_lmer.md b/man/rmd/linear_reg_lmer.md index 992dae4c0..92c08b8fb 100644 --- a/man/rmd/linear_reg_lmer.md +++ b/man/rmd/linear_reg_lmer.md @@ -96,6 +96,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "lmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/linear_reg_quantreg.Rmd b/man/rmd/linear_reg_quantreg.Rmd index 881377611..cdeb0e881 100644 --- a/man/rmd/linear_reg_quantreg.Rmd +++ b/man/rmd/linear_reg_quantreg.Rmd @@ -66,6 +66,17 @@ as.matrix(qr_pred$.pred_quantile) #| child: template-makes-dummies.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "quantreg") |> + dplyr::select(mode, type) + +``` + ## Case weights ```{r} diff --git a/man/rmd/linear_reg_quantreg.md b/man/rmd/linear_reg_quantreg.md index 8039f6534..58a95fd46 100644 --- a/man/rmd/linear_reg_quantreg.md +++ b/man/rmd/linear_reg_quantreg.md @@ -133,6 +133,22 @@ as.matrix(qr_pred$.pred_quantile) Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \\code{\\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "quantreg") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 1 x 2 +## mode type +## +## 1 quantile regression quantile +``` + ## Case weights diff --git a/man/rmd/linear_reg_spark.Rmd b/man/rmd/linear_reg_spark.Rmd index a49e1f2b2..f1d5b3ed0 100644 --- a/man/rmd/linear_reg_spark.Rmd +++ b/man/rmd/linear_reg_spark.Rmd @@ -65,6 +65,17 @@ By default, `ml_linear_regression()` uses the argument `standardization = TRUE` Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/linear_reg_spark.md b/man/rmd/linear_reg_spark.md index d1d753641..a9b2a9136 100644 --- a/man/rmd/linear_reg_spark.md +++ b/man/rmd/linear_reg_spark.md @@ -63,6 +63,22 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 1 x 2 +## mode type +## +## 1 regression numeric +``` + ## Other details diff --git a/man/rmd/linear_reg_stan.Rmd b/man/rmd/linear_reg_stan.Rmd index a6c6bed04..5ca804523 100644 --- a/man/rmd/linear_reg_stan.Rmd +++ b/man/rmd/linear_reg_stan.Rmd @@ -49,6 +49,17 @@ For prediction, the `"stan"` engine can compute posterior intervals analogous t #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-stan) for `linear_reg()` with the `"stan"` engine. diff --git a/man/rmd/linear_reg_stan.md b/man/rmd/linear_reg_stan.md index 4905ddccd..912884429 100644 --- a/man/rmd/linear_reg_stan.md +++ b/man/rmd/linear_reg_stan.md @@ -57,6 +57,25 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-stan) for `linear_reg()` with the `"stan"` engine. diff --git a/man/rmd/linear_reg_stan_glmer.Rmd b/man/rmd/linear_reg_stan_glmer.Rmd index 5a65c17c8..a9462a244 100644 --- a/man/rmd/linear_reg_stan_glmer.Rmd +++ b/man/rmd/linear_reg_stan_glmer.Rmd @@ -85,6 +85,17 @@ For prediction, the `"stan_glmer"` engine can compute posterior intervals analog #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) + +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/linear_reg_stan_glmer.md b/man/rmd/linear_reg_stan_glmer.md index fa8b958e9..4b0fd0d78 100644 --- a/man/rmd/linear_reg_stan_glmer.md +++ b/man/rmd/linear_reg_stan_glmer.md @@ -112,6 +112,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("linear_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression pred_int +## 3 regression raw +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/logistic_reg_LiblineaR.Rmd b/man/rmd/logistic_reg_LiblineaR.Rmd index 4750ff691..31a311f10 100644 --- a/man/rmd/logistic_reg_LiblineaR.Rmd +++ b/man/rmd/logistic_reg_LiblineaR.Rmd @@ -52,6 +52,17 @@ logistic_reg(penalty = double(1), mixture = double(1)) |> #| child: template-same-scale.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/logistic_reg_LiblineaR.md b/man/rmd/logistic_reg_LiblineaR.md index 93b055de4..2f75f0a8c 100644 --- a/man/rmd/logistic_reg_LiblineaR.md +++ b/man/rmd/logistic_reg_LiblineaR.md @@ -49,6 +49,24 @@ Factor/categorical predictors need to be converted to numeric values (e.g., dumm Predictors should have the same scale. One way to achieve this is to center and scale each so that each predictor has mean zero and a variance of one. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Sparse Data diff --git a/man/rmd/logistic_reg_brulee.Rmd b/man/rmd/logistic_reg_brulee.Rmd index 836189248..178f02536 100644 --- a/man/rmd/logistic_reg_brulee.Rmd +++ b/man/rmd/logistic_reg_brulee.Rmd @@ -66,6 +66,17 @@ logistic_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/logistic_reg_brulee.md b/man/rmd/logistic_reg_brulee.md index 58f2fd171..e1f446084 100644 --- a/man/rmd/logistic_reg_brulee.md +++ b/man/rmd/logistic_reg_brulee.md @@ -61,6 +61,23 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/logistic_reg_gee.Rmd b/man/rmd/logistic_reg_gee.Rmd index d37100e4d..9ef6aaee8 100644 --- a/man/rmd/logistic_reg_gee.Rmd +++ b/man/rmd/logistic_reg_gee.Rmd @@ -79,6 +79,17 @@ Also, because of issues with the `gee()` function, a supplementary call to `glm( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) + +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/logistic_reg_gee.md b/man/rmd/logistic_reg_gee.md index 2298d34af..8b3376a27 100644 --- a/man/rmd/logistic_reg_gee.md +++ b/man/rmd/logistic_reg_gee.md @@ -85,6 +85,24 @@ Also, because of issues with the `gee()` function, a supplementary call to `glm( The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/logistic_reg_glm.Rmd b/man/rmd/logistic_reg_glm.Rmd index 4dd2df1b3..2a402df46 100644 --- a/man/rmd/logistic_reg_glm.Rmd +++ b/man/rmd/logistic_reg_glm.Rmd @@ -41,6 +41,17 @@ logistic_reg() |> _However_, the documentation in [stats::glm()] assumes that is specific type of case weights are being used:"Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers `w_i`, that each response `y_i` is the mean of `w_i` unit-weight observations. For a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM." +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/logistic_reg_glm.md b/man/rmd/logistic_reg_glm.md index c0b455ac8..d570a3e8c 100644 --- a/man/rmd/logistic_reg_glm.md +++ b/man/rmd/logistic_reg_glm.md @@ -62,6 +62,25 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e _However_, the documentation in [stats::glm()] assumes that is specific type of case weights are being used:"Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers `w_i`, that each response `y_i` is the mean of `w_i` unit-weight observations. For a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes: they would rarely be used for a Poisson GLM." +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +## 4 classification conf_int +``` + ## Saving fitted model objects diff --git a/man/rmd/logistic_reg_glmer.Rmd b/man/rmd/logistic_reg_glmer.Rmd index 83e661ce6..19e0122e8 100644 --- a/man/rmd/logistic_reg_glmer.Rmd +++ b/man/rmd/logistic_reg_glmer.Rmd @@ -69,6 +69,17 @@ fit(glmer_wflow, data = toenail) #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/logistic_reg_glmer.md b/man/rmd/logistic_reg_glmer.md index 0892b531c..0a788da1d 100644 --- a/man/rmd/logistic_reg_glmer.md +++ b/man/rmd/logistic_reg_glmer.md @@ -96,6 +96,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/logistic_reg_glmnet.Rmd b/man/rmd/logistic_reg_glmnet.Rmd index b744a22c5..dee648f52 100644 --- a/man/rmd/logistic_reg_glmnet.Rmd +++ b/man/rmd/logistic_reg_glmnet.Rmd @@ -61,6 +61,17 @@ By default, [glmnet::glmnet()] uses the argument `standardize = TRUE` to center #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/logistic_reg_glmnet.md b/man/rmd/logistic_reg_glmnet.md index 25ddeb534..72fb1b91c 100644 --- a/man/rmd/logistic_reg_glmnet.md +++ b/man/rmd/logistic_reg_glmnet.md @@ -59,6 +59,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Sparse Data diff --git a/man/rmd/logistic_reg_h2o.Rmd b/man/rmd/logistic_reg_h2o.Rmd index b016fd774..09a8c281d 100644 --- a/man/rmd/logistic_reg_h2o.Rmd +++ b/man/rmd/logistic_reg_h2o.Rmd @@ -68,6 +68,16 @@ logistic_reg() |> By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale all numeric columns. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` ## Initializing h2o diff --git a/man/rmd/logistic_reg_h2o.md b/man/rmd/logistic_reg_h2o.md index 0e608a1fd..4c9e9d769 100644 --- a/man/rmd/logistic_reg_h2o.md +++ b/man/rmd/logistic_reg_h2o.md @@ -75,6 +75,22 @@ scale each so that each predictor has mean zero and a variance of one. By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale all numeric columns. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` ## Initializing h2o diff --git a/man/rmd/logistic_reg_keras.Rmd b/man/rmd/logistic_reg_keras.Rmd index e530244d4..7aec5ed70 100644 --- a/man/rmd/logistic_reg_keras.Rmd +++ b/man/rmd/logistic_reg_keras.Rmd @@ -58,6 +58,17 @@ logistic_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/logistic_reg_keras.md b/man/rmd/logistic_reg_keras.md index 75fe4925a..d40a4084a 100644 --- a/man/rmd/logistic_reg_keras.md +++ b/man/rmd/logistic_reg_keras.md @@ -51,6 +51,23 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Saving fitted model objects diff --git a/man/rmd/logistic_reg_spark.Rmd b/man/rmd/logistic_reg_spark.Rmd index 1ded6c941..ebadb40a5 100644 --- a/man/rmd/logistic_reg_spark.Rmd +++ b/man/rmd/logistic_reg_spark.Rmd @@ -64,6 +64,17 @@ By default, `ml_logistic_regression()` uses the argument `standardization = TRUE Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/logistic_reg_spark.md b/man/rmd/logistic_reg_spark.md index 78dc986cb..368b93a20 100644 --- a/man/rmd/logistic_reg_spark.md +++ b/man/rmd/logistic_reg_spark.md @@ -63,6 +63,23 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Other details diff --git a/man/rmd/logistic_reg_stan.Rmd b/man/rmd/logistic_reg_stan.Rmd index 9bc004f9c..87b68a837 100644 --- a/man/rmd/logistic_reg_stan.Rmd +++ b/man/rmd/logistic_reg_stan.Rmd @@ -49,6 +49,17 @@ For prediction, the `"stan"` engine can compute posterior intervals analogous to #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#logistic-reg-stan) for `logistic_reg()` with the `"stan"` engine. diff --git a/man/rmd/logistic_reg_stan.md b/man/rmd/logistic_reg_stan.md index 3cba6c6ed..f1726903a 100644 --- a/man/rmd/logistic_reg_stan.md +++ b/man/rmd/logistic_reg_stan.md @@ -57,6 +57,26 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +## 4 classification conf_int +## 5 classification pred_int +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#logistic-reg-stan) for `logistic_reg()` with the `"stan"` engine. diff --git a/man/rmd/logistic_reg_stan_glmer.Rmd b/man/rmd/logistic_reg_stan_glmer.Rmd index eba7e96b7..6f90d9e8a 100644 --- a/man/rmd/logistic_reg_stan_glmer.Rmd +++ b/man/rmd/logistic_reg_stan_glmer.Rmd @@ -84,6 +84,17 @@ For prediction, the `"stan_glmer"` engine can compute posterior intervals analog #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) + +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/logistic_reg_stan_glmer.md b/man/rmd/logistic_reg_stan_glmer.md index caf273607..cfcf21050 100644 --- a/man/rmd/logistic_reg_stan_glmer.md +++ b/man/rmd/logistic_reg_stan_glmer.md @@ -111,6 +111,26 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("logistic_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification conf_int +## 4 classification pred_int +## 5 classification raw +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/mars_earth.Rmd b/man/rmd/mars_earth.Rmd index 15b17069e..3beb3f2f7 100644 --- a/man/rmd/mars_earth.Rmd +++ b/man/rmd/mars_earth.Rmd @@ -68,6 +68,16 @@ An alternate method for using MARs for categorical outcomes can be found in [dis Note that the `earth` package documentation has: "In the current implementation, _building models with weights can be slow_." +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mars_predict") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/mars_earth.md b/man/rmd/mars_earth.md index bac6adeb6..f430fc3f9 100644 --- a/man/rmd/mars_earth.md +++ b/man/rmd/mars_earth.md @@ -89,6 +89,25 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that the `earth` package documentation has: "In the current implementation, _building models with weights can be slow_." +## Prediction types + + +``` r +parsnip:::get_from_env("mars_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/mlp_brulee.Rmd b/man/rmd/mlp_brulee.Rmd index ce69ecfbd..4cb7619c6 100644 --- a/man/rmd/mlp_brulee.Rmd +++ b/man/rmd/mlp_brulee.Rmd @@ -102,6 +102,17 @@ mlp( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/mlp_brulee.md b/man/rmd/mlp_brulee.md index 3f047a500..35895b581 100644 --- a/man/rmd/mlp_brulee.md +++ b/man/rmd/mlp_brulee.md @@ -124,6 +124,24 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/mlp_brulee_two_layer.Rmd b/man/rmd/mlp_brulee_two_layer.Rmd index 638e33d5b..93dad6f76 100644 --- a/man/rmd/mlp_brulee_two_layer.Rmd +++ b/man/rmd/mlp_brulee_two_layer.Rmd @@ -108,6 +108,17 @@ mlp( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee_two_layer") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/mlp_brulee_two_layer.md b/man/rmd/mlp_brulee_two_layer.md index cb0f6076e..3093ad263 100644 --- a/man/rmd/mlp_brulee_two_layer.md +++ b/man/rmd/mlp_brulee_two_layer.md @@ -140,6 +140,24 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "brulee_two_layer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/mlp_h2o.Rmd b/man/rmd/mlp_h2o.Rmd index 64d1dd312..4f9ddb5bf 100644 --- a/man/rmd/mlp_h2o.Rmd +++ b/man/rmd/mlp_h2o.Rmd @@ -91,6 +91,16 @@ mlp( By default, [h2o::h2o.deeplearning()] uses the argument `standardize = TRUE` to center and scale all numeric columns. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` ## Initializing h2o diff --git a/man/rmd/mlp_h2o.md b/man/rmd/mlp_h2o.md index 5c937d44e..40bc5c21a 100644 --- a/man/rmd/mlp_h2o.md +++ b/man/rmd/mlp_h2o.md @@ -122,6 +122,24 @@ scale each so that each predictor has mean zero and a variance of one. By default, [h2o::h2o.deeplearning()] uses the argument `standardize = TRUE` to center and scale all numeric columns. +## Prediction types + + +``` r +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +``` ## Initializing h2o diff --git a/man/rmd/mlp_keras.Rmd b/man/rmd/mlp_keras.Rmd index df8f646c7..d9eac15fd 100644 --- a/man/rmd/mlp_keras.Rmd +++ b/man/rmd/mlp_keras.Rmd @@ -78,6 +78,17 @@ mlp( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/mlp_keras.md b/man/rmd/mlp_keras.md index 2e3a8e981..d0685e813 100644 --- a/man/rmd/mlp_keras.md +++ b/man/rmd/mlp_keras.md @@ -102,6 +102,26 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/mlp_nnet.Rmd b/man/rmd/mlp_nnet.Rmd index a0a1b2e01..03132f9d9 100644 --- a/man/rmd/mlp_nnet.Rmd +++ b/man/rmd/mlp_nnet.Rmd @@ -79,6 +79,17 @@ mlp( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/mlp_nnet.md b/man/rmd/mlp_nnet.md index e973e5d88..6f744b8b6 100644 --- a/man/rmd/mlp_nnet.md +++ b/man/rmd/mlp_nnet.md @@ -93,6 +93,26 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("mlp_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/multinom_reg_brulee.Rmd b/man/rmd/multinom_reg_brulee.Rmd index 1cdf9a4f4..d93fb7659 100644 --- a/man/rmd/multinom_reg_brulee.Rmd +++ b/man/rmd/multinom_reg_brulee.Rmd @@ -66,6 +66,17 @@ multinom_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/multinom_reg_brulee.md b/man/rmd/multinom_reg_brulee.md index 9e25828f2..eda06d2a1 100644 --- a/man/rmd/multinom_reg_brulee.md +++ b/man/rmd/multinom_reg_brulee.md @@ -61,6 +61,23 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "brulee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/multinom_reg_glmnet.Rmd b/man/rmd/multinom_reg_glmnet.Rmd index 428651098..661bafac6 100644 --- a/man/rmd/multinom_reg_glmnet.Rmd +++ b/man/rmd/multinom_reg_glmnet.Rmd @@ -65,6 +65,17 @@ The "Fitting and Predicting with parsnip" article contains [examples](https://pa #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/multinom_reg_glmnet.md b/man/rmd/multinom_reg_glmnet.md index 991b8ac8e..76ac2ccc5 100644 --- a/man/rmd/multinom_reg_glmnet.md +++ b/man/rmd/multinom_reg_glmnet.md @@ -63,6 +63,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Sparse Data diff --git a/man/rmd/multinom_reg_h2o.Rmd b/man/rmd/multinom_reg_h2o.Rmd index adf9fd25c..854b32e61 100644 --- a/man/rmd/multinom_reg_h2o.Rmd +++ b/man/rmd/multinom_reg_h2o.Rmd @@ -57,6 +57,17 @@ multinom_reg(penalty = double(1), mixture = double(1)) |> By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale the data. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` + ## Initializing h2o ```{r} diff --git a/man/rmd/multinom_reg_h2o.md b/man/rmd/multinom_reg_h2o.md index 5389a8ef3..17d79f4fb 100644 --- a/man/rmd/multinom_reg_h2o.md +++ b/man/rmd/multinom_reg_h2o.md @@ -55,6 +55,23 @@ scale each so that each predictor has mean zero and a variance of one. By default, [h2o::h2o.glm()] uses the argument `standardize = TRUE` to center and scale the data. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Initializing h2o diff --git a/man/rmd/multinom_reg_keras.Rmd b/man/rmd/multinom_reg_keras.Rmd index 60295f616..1a103e4cf 100644 --- a/man/rmd/multinom_reg_keras.Rmd +++ b/man/rmd/multinom_reg_keras.Rmd @@ -58,6 +58,17 @@ multinom_reg(penalty = double(1)) |> #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/multinom_reg_keras.md b/man/rmd/multinom_reg_keras.md index 95e9cfa00..669e1cfd0 100644 --- a/man/rmd/multinom_reg_keras.md +++ b/man/rmd/multinom_reg_keras.md @@ -51,6 +51,23 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "keras") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Saving fitted model objects diff --git a/man/rmd/multinom_reg_nnet.Rmd b/man/rmd/multinom_reg_nnet.Rmd index d84a506cd..ea629bb39 100644 --- a/man/rmd/multinom_reg_nnet.Rmd +++ b/man/rmd/multinom_reg_nnet.Rmd @@ -50,6 +50,17 @@ multinom_reg(penalty = double(1)) |> #| child: template-same-scale.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#multinom-reg-nnet) for `multinom_reg()` with the `"nnet"` engine. diff --git a/man/rmd/multinom_reg_nnet.md b/man/rmd/multinom_reg_nnet.md index 85292e4de..68adb07fd 100644 --- a/man/rmd/multinom_reg_nnet.md +++ b/man/rmd/multinom_reg_nnet.md @@ -44,6 +44,24 @@ Factor/categorical predictors need to be converted to numeric values (e.g., dumm Predictors should have the same scale. One way to achieve this is to center and scale each so that each predictor has mean zero and a variance of one. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "nnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#multinom-reg-nnet) for `multinom_reg()` with the `"nnet"` engine. diff --git a/man/rmd/multinom_reg_spark.Rmd b/man/rmd/multinom_reg_spark.Rmd index 152d74641..86e852f67 100644 --- a/man/rmd/multinom_reg_spark.Rmd +++ b/man/rmd/multinom_reg_spark.Rmd @@ -64,6 +64,16 @@ By default, `ml_multinom_regression()` uses the argument `standardization = TRUE Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` ## Other details diff --git a/man/rmd/multinom_reg_spark.md b/man/rmd/multinom_reg_spark.md index d8d262c42..41960b153 100644 --- a/man/rmd/multinom_reg_spark.md +++ b/man/rmd/multinom_reg_spark.md @@ -63,6 +63,22 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("multinom_reg_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` ## Other details diff --git a/man/rmd/naive_Bayes_h2o.Rmd b/man/rmd/naive_Bayes_h2o.Rmd index 69d2c6d44..9f55a4f5c 100644 --- a/man/rmd/naive_Bayes_h2o.Rmd +++ b/man/rmd/naive_Bayes_h2o.Rmd @@ -54,6 +54,17 @@ naive_Bayes(Laplace = numeric(0)) |> translate() ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` + ## Initializing h2o ```{r} diff --git a/man/rmd/naive_Bayes_h2o.md b/man/rmd/naive_Bayes_h2o.md index c2cbe9e03..15b2dc102 100644 --- a/man/rmd/naive_Bayes_h2o.md +++ b/man/rmd/naive_Bayes_h2o.md @@ -49,6 +49,23 @@ naive_Bayes(Laplace = numeric(0)) |> ## validation_frame = missing_arg(), laplace = numeric(0)) ``` +## Prediction types + + +``` r +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## Initializing h2o diff --git a/man/rmd/naive_Bayes_klaR.Rmd b/man/rmd/naive_Bayes_klaR.Rmd index 40b4dd53b..c677a15cf 100644 --- a/man/rmd/naive_Bayes_klaR.Rmd +++ b/man/rmd/naive_Bayes_klaR.Rmd @@ -59,6 +59,17 @@ The columns for qualitative predictors should always be represented as factors ( #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "klaR") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/naive_Bayes_klaR.md b/man/rmd/naive_Bayes_klaR.md index 20d9d712c..9c38e8049 100644 --- a/man/rmd/naive_Bayes_klaR.md +++ b/man/rmd/naive_Bayes_klaR.md @@ -57,6 +57,24 @@ Variance calculations are used in these computations so _zero-variance_ predicto The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "klaR") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/naive_Bayes_naivebayes.Rmd b/man/rmd/naive_Bayes_naivebayes.Rmd index f5ffcce47..0b5f7a1c7 100644 --- a/man/rmd/naive_Bayes_naivebayes.Rmd +++ b/man/rmd/naive_Bayes_naivebayes.Rmd @@ -61,6 +61,17 @@ For count data, integers can be estimated using a Poisson distribution if the ar #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "naivebayes") |> + dplyr::select(mode, type) + +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/naive_Bayes_naivebayes.md b/man/rmd/naive_Bayes_naivebayes.md index 6e8df9fd3..9cb0e7eec 100644 --- a/man/rmd/naive_Bayes_naivebayes.md +++ b/man/rmd/naive_Bayes_naivebayes.md @@ -59,6 +59,23 @@ Variance calculations are used in these computations so _zero-variance_ predicto The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("naive_Bayes_predict") |> + dplyr::filter(engine == "naivebayes") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +``` + ## References - Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer. diff --git a/man/rmd/nearest_neighbor_kknn.Rmd b/man/rmd/nearest_neighbor_kknn.Rmd index b599e2828..4f7009500 100644 --- a/man/rmd/nearest_neighbor_kknn.Rmd +++ b/man/rmd/nearest_neighbor_kknn.Rmd @@ -82,6 +82,16 @@ The "Fitting and Predicting with parsnip" article contains [examples](https://pa #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("nearest_neighbor_predict") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/nearest_neighbor_kknn.md b/man/rmd/nearest_neighbor_kknn.md index 2a62f36c2..3112c029f 100644 --- a/man/rmd/nearest_neighbor_kknn.md +++ b/man/rmd/nearest_neighbor_kknn.md @@ -96,6 +96,25 @@ The "Fitting and Predicting with parsnip" article contains [examples](https://pa The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("nearest_neighbor_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/null-model.Rmd b/man/rmd/null-model.Rmd index 4c413ee93..d7f681988 100644 --- a/man/rmd/null-model.Rmd +++ b/man/rmd/null-model.Rmd @@ -21,3 +21,12 @@ null_model() |> translate() ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("null_model_predict") |> + dplyr::select(mode, type) + +``` \ No newline at end of file diff --git a/man/rmd/null-model.md b/man/rmd/null-model.md index 8ca4bcbb5..f908a77af 100644 --- a/man/rmd/null-model.md +++ b/man/rmd/null-model.md @@ -39,3 +39,21 @@ null_model() |> ## parsnip::nullmodel(x = missing_arg(), y = missing_arg()) ``` +## Prediction types + + +``` r +parsnip:::get_from_env("null_model_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` diff --git a/man/rmd/pls_mixOmics.Rmd b/man/rmd/pls_mixOmics.Rmd index 03e690b35..c1b19dca2 100644 --- a/man/rmd/pls_mixOmics.Rmd +++ b/man/rmd/pls_mixOmics.Rmd @@ -101,6 +101,16 @@ This package is available via the Bioconductor repository and is not accessible #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("pls_predict") |> + dplyr::select(mode, type) + +``` + ## References - Rohart F and Gautier B and Singh A and Le Cao K-A (2017). "mixOmics: An R package for 'omics feature selection and multiple data integration." PLoS computational biology, 13(11), e1005752. diff --git a/man/rmd/pls_mixOmics.md b/man/rmd/pls_mixOmics.md index 85e1a0103..b721cc17b 100644 --- a/man/rmd/pls_mixOmics.md +++ b/man/rmd/pls_mixOmics.md @@ -111,6 +111,25 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("pls_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## References - Rohart F and Gautier B and Singh A and Le Cao K-A (2017). "mixOmics: An R package for 'omics feature selection and multiple data integration." PLoS computational biology, 13(11), e1005752. diff --git a/man/rmd/poisson_reg_gee.Rmd b/man/rmd/poisson_reg_gee.Rmd index 66e9f8f2d..446708986 100644 --- a/man/rmd/poisson_reg_gee.Rmd +++ b/man/rmd/poisson_reg_gee.Rmd @@ -76,6 +76,17 @@ fit(gee_wflow, data = longitudinal_counts) Also, because of issues with the `gee()` function, a supplementary call to `glm()` is needed to get the rank and QR decomposition objects so that `predict()` can be used. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) + +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/poisson_reg_gee.md b/man/rmd/poisson_reg_gee.md index 7f9c37792..c2621ec60 100644 --- a/man/rmd/poisson_reg_gee.md +++ b/man/rmd/poisson_reg_gee.md @@ -82,6 +82,23 @@ The `gee::gee()` function always prints out warnings and output even when `silen Also, because of issues with the `gee()` function, a supplementary call to `glm()` is needed to get the rank and QR decomposition objects so that `predict()` can be used. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "gee") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. _Biometrika_, 73 13–22. diff --git a/man/rmd/poisson_reg_glm.Rmd b/man/rmd/poisson_reg_glm.Rmd index 2f66566e9..885fc14ea 100644 --- a/man/rmd/poisson_reg_glm.Rmd +++ b/man/rmd/poisson_reg_glm.Rmd @@ -45,6 +45,17 @@ _However_, the documentation in [stats::glm()] assumes that is specific type of If frequency weights are being used in your application, the [glm_grouped()] model (and corresponding engine) may be more appropriate. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/poisson_reg_glm.md b/man/rmd/poisson_reg_glm.md index b1672e030..4848691e2 100644 --- a/man/rmd/poisson_reg_glm.md +++ b/man/rmd/poisson_reg_glm.md @@ -54,6 +54,23 @@ _However_, the documentation in [stats::glm()] assumes that is specific type of If frequency weights are being used in your application, the [glm_grouped()] model (and corresponding engine) may be more appropriate. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glm") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## Saving fitted model objects diff --git a/man/rmd/poisson_reg_glmer.Rmd b/man/rmd/poisson_reg_glmer.Rmd index 655f9d78a..a8f713982 100644 --- a/man/rmd/poisson_reg_glmer.Rmd +++ b/man/rmd/poisson_reg_glmer.Rmd @@ -68,6 +68,17 @@ fit(glmer_wflow, data = longitudinal_counts) #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) + +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/poisson_reg_glmer.md b/man/rmd/poisson_reg_glmer.md index 5cdec81b5..52c96cfcb 100644 --- a/man/rmd/poisson_reg_glmer.md +++ b/man/rmd/poisson_reg_glmer.md @@ -95,6 +95,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## References - J Pinheiro, and D Bates. 2000. _Mixed-effects models in S and S-PLUS_. Springer, New York, NY diff --git a/man/rmd/poisson_reg_glmnet.Rmd b/man/rmd/poisson_reg_glmnet.Rmd index 7127632c8..7b6f37a2c 100644 --- a/man/rmd/poisson_reg_glmnet.Rmd +++ b/man/rmd/poisson_reg_glmnet.Rmd @@ -66,6 +66,17 @@ By default, `glmnet::glmnet()` uses the argument `standardize = TRUE` to center #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/poisson_reg_glmnet.md b/man/rmd/poisson_reg_glmnet.md index b35c1489f..3bbe3ff57 100644 --- a/man/rmd/poisson_reg_glmnet.md +++ b/man/rmd/poisson_reg_glmnet.md @@ -64,6 +64,23 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` + ## Saving fitted model objects diff --git a/man/rmd/poisson_reg_h2o.Rmd b/man/rmd/poisson_reg_h2o.Rmd index 5a9ffddfb..e8c852c0f 100644 --- a/man/rmd/poisson_reg_h2o.Rmd +++ b/man/rmd/poisson_reg_h2o.Rmd @@ -61,6 +61,16 @@ poisson_reg(penalty = double(1), mixture = double(1)) |> By default, `h2o::h2o.glm()` uses the argument `standardize = TRUE` to center and scale all numerical columns. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` ## Initializing h2o diff --git a/man/rmd/poisson_reg_h2o.md b/man/rmd/poisson_reg_h2o.md index 743e7b082..fc3a24eb4 100644 --- a/man/rmd/poisson_reg_h2o.md +++ b/man/rmd/poisson_reg_h2o.md @@ -59,6 +59,22 @@ scale each so that each predictor has mean zero and a variance of one. By default, `h2o::h2o.glm()` uses the argument `standardize = TRUE` to center and scale all numerical columns. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` ## Initializing h2o diff --git a/man/rmd/poisson_reg_hurdle.Rmd b/man/rmd/poisson_reg_hurdle.Rmd index 07c996bf2..cb2f3ca32 100644 --- a/man/rmd/poisson_reg_hurdle.Rmd +++ b/man/rmd/poisson_reg_hurdle.Rmd @@ -72,3 +72,14 @@ The reason for this is that [workflows::add_formula()] will try to create the mo ```{r} #| child: template-uses-case-weights.Rmd ``` + +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "hurdle") |> + dplyr::select(mode, type) + +``` \ No newline at end of file diff --git a/man/rmd/poisson_reg_hurdle.md b/man/rmd/poisson_reg_hurdle.md index 2431e7ddc..6acc84bb5 100644 --- a/man/rmd/poisson_reg_hurdle.md +++ b/man/rmd/poisson_reg_hurdle.md @@ -107,3 +107,20 @@ The reason for this is that [workflows::add_formula()] will try to create the mo This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`. The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. + +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "hurdle") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` diff --git a/man/rmd/poisson_reg_stan.Rmd b/man/rmd/poisson_reg_stan.Rmd index 825bb297d..3988ef88c 100644 --- a/man/rmd/poisson_reg_stan.Rmd +++ b/man/rmd/poisson_reg_stan.Rmd @@ -53,6 +53,17 @@ For prediction, the `"stan"` engine can compute posterior intervals analogous to #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-stan) for `poisson_reg()` with the `"stan"` engine. diff --git a/man/rmd/poisson_reg_stan.md b/man/rmd/poisson_reg_stan.md index a03a87c36..bb3572f96 100644 --- a/man/rmd/poisson_reg_stan.md +++ b/man/rmd/poisson_reg_stan.md @@ -61,6 +61,25 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression conf_int +## 3 regression pred_int +## 4 regression raw +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#linear-reg-stan) for `poisson_reg()` with the `"stan"` engine. diff --git a/man/rmd/poisson_reg_stan_glmer.Rmd b/man/rmd/poisson_reg_stan_glmer.Rmd index 57344f7e7..b0d963629 100644 --- a/man/rmd/poisson_reg_stan_glmer.Rmd +++ b/man/rmd/poisson_reg_stan_glmer.Rmd @@ -83,6 +83,17 @@ For prediction, the `"stan_glmer"` engine can compute posterior intervals analog #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) + +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/poisson_reg_stan_glmer.md b/man/rmd/poisson_reg_stan_glmer.md index 9f1cb303c..6fabe26a2 100644 --- a/man/rmd/poisson_reg_stan_glmer.md +++ b/man/rmd/poisson_reg_stan_glmer.md @@ -110,6 +110,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "stan_glmer") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 regression pred_int +## 3 regression raw +``` + ## References - McElreath, R. 2020 _Statistical Rethinking_. CRC Press. diff --git a/man/rmd/poisson_reg_zeroinfl.Rmd b/man/rmd/poisson_reg_zeroinfl.Rmd index bdccdb419..376f2ef91 100644 --- a/man/rmd/poisson_reg_zeroinfl.Rmd +++ b/man/rmd/poisson_reg_zeroinfl.Rmd @@ -72,3 +72,14 @@ The reason for this is that [workflows::add_formula()] will try to create the mo ```{r} #| child: template-uses-case-weights.Rmd ``` + +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "zeroinfl") |> + dplyr::select(mode, type) + +``` \ No newline at end of file diff --git a/man/rmd/poisson_reg_zeroinfl.md b/man/rmd/poisson_reg_zeroinfl.md index 9e2d6893b..75d2e090c 100644 --- a/man/rmd/poisson_reg_zeroinfl.md +++ b/man/rmd/poisson_reg_zeroinfl.md @@ -108,3 +108,20 @@ The reason for this is that [workflows::add_formula()] will try to create the mo This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`. The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. + +## Prediction types + + +``` r +parsnip:::get_from_env("poisson_reg_predict") |> + dplyr::filter(engine == "zeroinfl") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 2 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +``` diff --git a/man/rmd/proportional_hazards_glmnet.Rmd b/man/rmd/proportional_hazards_glmnet.Rmd index a92c38ea9..71c6a2b75 100644 --- a/man/rmd/proportional_hazards_glmnet.Rmd +++ b/man/rmd/proportional_hazards_glmnet.Rmd @@ -120,6 +120,17 @@ Note that columns used in the `strata()` function _will_ also be estimated in th #| child: template-butcher.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("proportional_hazards_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) + +``` + # References - Simon N, Friedman J, Hastie T, Tibshirani R. 2011. "Regularization Paths for Cox’s Proportional Hazards Model via Coordinate Descent." _Journal of Statistical Software_, Articles 39 (5): 1–13. \doi{10.18637/jss.v039.i05}. @@ -127,4 +138,3 @@ Note that columns used in the `strata()` function _will_ also be estimated in th - Hastie T, Tibshirani R, Wainwright M. 2015. _Statistical Learning with Sparsity_. CRC Press. - Kuhn M, Johnson K. 2013. _Applied Predictive Modeling_. Springer. - diff --git a/man/rmd/proportional_hazards_glmnet.md b/man/rmd/proportional_hazards_glmnet.md index 9d7dda70a..52267983f 100644 --- a/man/rmd/proportional_hazards_glmnet.md +++ b/man/rmd/proportional_hazards_glmnet.md @@ -124,6 +124,25 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the [butcher](https://butcher.tidymodels.org) package. +## Prediction types + + +``` r +parsnip:::get_from_env("proportional_hazards_predict") |> + dplyr::filter(engine == "glmnet") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 censored regression linear_pred +## 2 censored regression survival +## 3 censored regression time +## 4 censored regression raw +``` + # References - Simon N, Friedman J, Hastie T, Tibshirani R. 2011. "Regularization Paths for Cox’s Proportional Hazards Model via Coordinate Descent." _Journal of Statistical Software_, Articles 39 (5): 1–13. \doi{10.18637/jss.v039.i05}. @@ -131,4 +150,3 @@ This model object contains data that are not required to make predictions. When - Hastie T, Tibshirani R, Wainwright M. 2015. _Statistical Learning with Sparsity_. CRC Press. - Kuhn M, Johnson K. 2013. _Applied Predictive Modeling_. Springer. - diff --git a/man/rmd/proportional_hazards_survival.Rmd b/man/rmd/proportional_hazards_survival.Rmd index 4d1a312cf..694978d72 100644 --- a/man/rmd/proportional_hazards_survival.Rmd +++ b/man/rmd/proportional_hazards_survival.Rmd @@ -61,6 +61,17 @@ Note that columns used in the `strata()` function will not be estimated in the r #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("proportional_hazards_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) + +``` + ## References - Andersen P, Gill R. 1982. Cox's regression model for counting processes, a large sample study. _Annals of Statistics_ 10, 1100-1120. diff --git a/man/rmd/proportional_hazards_survival.md b/man/rmd/proportional_hazards_survival.md index cdae3fd7c..aabf3938d 100644 --- a/man/rmd/proportional_hazards_survival.md +++ b/man/rmd/proportional_hazards_survival.md @@ -106,6 +106,24 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("proportional_hazards_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression survival +## 3 censored regression linear_pred +``` + ## References - Andersen P, Gill R. 1982. Cox's regression model for counting processes, a large sample study. _Annals of Statistics_ 10, 1100-1120. diff --git a/man/rmd/rand_forest_aorsf.Rmd b/man/rmd/rand_forest_aorsf.Rmd index 5dfc6fb4d..349a31f68 100644 --- a/man/rmd/rand_forest_aorsf.Rmd +++ b/man/rmd/rand_forest_aorsf.Rmd @@ -89,6 +89,17 @@ rand_forest() |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "aorsf") |> + dplyr::select(mode, type) + +``` + ## Other details Predictions of survival probability at a time exceeding the maximum observed event time are the predicted survival probability at the maximum observed time in the training data. diff --git a/man/rmd/rand_forest_aorsf.md b/man/rmd/rand_forest_aorsf.md index 3e1debd51..2c8a53b4f 100644 --- a/man/rmd/rand_forest_aorsf.md +++ b/man/rmd/rand_forest_aorsf.md @@ -1,7 +1,7 @@ -For this engine, there are multiple modes: censored regression, classification, and regression +For this engine, there are multiple modes: classification, regression, and censored regression ## Tuning Parameters @@ -9,12 +9,12 @@ For this engine, there are multiple modes: censored regression, classification, This model has 3 tuning parameters: +- `mtry`: # Randomly Selected Predictors (type: integer, default: ceiling(sqrt(n_predictors))) + - `trees`: # Trees (type: integer, default: 500L) - `min_n`: Minimal Node Size (type: integer, default: 5L) -- `mtry`: # Randomly Selected Predictors (type: integer, default: ceiling(sqrt(n_predictors))) - Additionally, this model has one engine-specific tuning parameter: * `split_min_stat`: Minimum test statistic required to split a node. Defaults are `3.841459` for censored regression (which is roughly a p-value of 0.05) and `0` for classification and regression. For classification, this tuning parameter should be between 0 and 1, and for regression it should be greater than or equal to 0. Higher values of this parameter cause trees grown by `aorsf` to have less depth. @@ -102,6 +102,28 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "aorsf") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 7 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification raw +## 4 regression numeric +## 5 regression raw +## 6 censored regression time +## # i 1 more row +``` + ## Other details Predictions of survival probability at a time exceeding the maximum observed event time are the predicted survival probability at the maximum observed time in the training data. diff --git a/man/rmd/rand_forest_h2o.Rmd b/man/rmd/rand_forest_h2o.Rmd index bb0bf6349..07282f72d 100644 --- a/man/rmd/rand_forest_h2o.Rmd +++ b/man/rmd/rand_forest_h2o.Rmd @@ -69,6 +69,16 @@ rand_forest( #| child: template-tree-split-factors.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` ## Initializing h2o diff --git a/man/rmd/rand_forest_h2o.md b/man/rmd/rand_forest_h2o.md index 8623f740a..453b5ebfa 100644 --- a/man/rmd/rand_forest_h2o.md +++ b/man/rmd/rand_forest_h2o.md @@ -86,6 +86,24 @@ rand_forest( This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +``` ## Initializing h2o diff --git a/man/rmd/rand_forest_partykit.Rmd b/man/rmd/rand_forest_partykit.Rmd index df6080b7a..802635b0c 100644 --- a/man/rmd/rand_forest_partykit.Rmd +++ b/man/rmd/rand_forest_partykit.Rmd @@ -84,6 +84,17 @@ rand_forest() |> #| child: template-tree-split-factors.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/rand_forest_partykit.md b/man/rmd/rand_forest_partykit.md index 3a42f79ad..a5e76e1b8 100644 --- a/man/rmd/rand_forest_partykit.md +++ b/man/rmd/rand_forest_partykit.md @@ -1,7 +1,7 @@ -For this engine, there are multiple modes: censored regression, regression, and classification +For this engine, there are multiple modes: regression, classification, and censored regression ## Tuning Parameters @@ -9,12 +9,12 @@ For this engine, there are multiple modes: censored regression, regression, and This model has 3 tuning parameters: -- `trees`: # Trees (type: integer, default: 500L) - - `min_n`: Minimal Node Size (type: integer, default: 20L) - `mtry`: # Randomly Selected Predictors (type: integer, default: 5L) +- `trees`: # Trees (type: integer, default: 500L) + ## Translation from parsnip to the original package (regression) The **bonsai** extension package is required to fit this model. @@ -97,6 +97,26 @@ rand_forest() |> This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "partykit") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +## 4 censored regression time +## 5 censored regression survival +``` + ## Other details diff --git a/man/rmd/rand_forest_randomForest.Rmd b/man/rmd/rand_forest_randomForest.Rmd index 3b9063fd9..b3a0dfd3e 100644 --- a/man/rmd/rand_forest_randomForest.Rmd +++ b/man/rmd/rand_forest_randomForest.Rmd @@ -75,6 +75,16 @@ rand_forest( #| child: template-butcher.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "randomForest") |> + dplyr::select(mode, type) + +``` ## Examples diff --git a/man/rmd/rand_forest_randomForest.md b/man/rmd/rand_forest_randomForest.md index 455aaadb2..79bbde5c1 100644 --- a/man/rmd/rand_forest_randomForest.md +++ b/man/rmd/rand_forest_randomForest.md @@ -91,6 +91,25 @@ This engine does not require any special encoding of the predictors. Categorical This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the [butcher](https://butcher.tidymodels.org) package. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "randomForest") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` ## Examples diff --git a/man/rmd/rand_forest_ranger.Rmd b/man/rmd/rand_forest_ranger.Rmd index b7ac200b3..f39466f87 100644 --- a/man/rmd/rand_forest_ranger.Rmd +++ b/man/rmd/rand_forest_ranger.Rmd @@ -97,6 +97,16 @@ While this engine supports sparse data as an input, it doesn't use it any differ #| child: template-butcher.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "ranger") |> + dplyr::select(mode, type) + +``` ## Examples diff --git a/man/rmd/rand_forest_ranger.md b/man/rmd/rand_forest_ranger.md index 6509b380d..0d36d6ea8 100644 --- a/man/rmd/rand_forest_ranger.md +++ b/man/rmd/rand_forest_ranger.md @@ -115,6 +115,27 @@ While this engine supports sparse data as an input, it doesn't use it any differ This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the [butcher](https://butcher.tidymodels.org) package. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "ranger") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 7 x 2 +## mode type +## +## 1 classification class +## 2 classification prob +## 3 classification conf_int +## 4 classification raw +## 5 regression numeric +## 6 regression conf_int +## # i 1 more row +``` ## Examples diff --git a/man/rmd/rand_forest_spark.Rmd b/man/rmd/rand_forest_spark.Rmd index 42186ba17..04c4dd52d 100644 --- a/man/rmd/rand_forest_spark.Rmd +++ b/man/rmd/rand_forest_spark.Rmd @@ -81,6 +81,16 @@ rand_forest( Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) + +``` ## References diff --git a/man/rmd/rand_forest_spark.md b/man/rmd/rand_forest_spark.md index b155c87e2..f68230bd2 100644 --- a/man/rmd/rand_forest_spark.md +++ b/man/rmd/rand_forest_spark.md @@ -105,6 +105,23 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("rand_forest_predict") |> + dplyr::filter(engine == "spark") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` ## References diff --git a/man/rmd/rule_fit_h2o.Rmd b/man/rmd/rule_fit_h2o.Rmd index 76a9e7880..37dd19c45 100644 --- a/man/rmd/rule_fit_h2o.Rmd +++ b/man/rmd/rule_fit_h2o.Rmd @@ -88,6 +88,17 @@ rule_fit( #| child: template-makes-dummies.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) + +``` + ## Other details ```{r} diff --git a/man/rmd/rule_fit_h2o.md b/man/rmd/rule_fit_h2o.md index deb49260f..832ed28ec 100644 --- a/man/rmd/rule_fit_h2o.md +++ b/man/rmd/rule_fit_h2o.md @@ -105,6 +105,25 @@ rule_fit( Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \\code{\\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators. +## Prediction types + + +``` r +parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "h2o") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +``` + ## Other details diff --git a/man/rmd/rule_fit_xrf.Rmd b/man/rmd/rule_fit_xrf.Rmd index 619ec6651..0199773b3 100644 --- a/man/rmd/rule_fit_xrf.Rmd +++ b/man/rmd/rule_fit_xrf.Rmd @@ -118,6 +118,17 @@ These differences will create a disparity in the values of the `penalty` argumen #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "xrf") |> + dplyr::select(mode, type) + +``` + ## References - Friedman and Popescu. "Predictive learning via rule ensembles." Ann. Appl. Stat. 2 (3) 916- 954, September 2008 diff --git a/man/rmd/rule_fit_xrf.md b/man/rmd/rule_fit_xrf.md index 4926bdc36..60aef9bb1 100644 --- a/man/rmd/rule_fit_xrf.md +++ b/man/rmd/rule_fit_xrf.md @@ -166,6 +166,24 @@ If the model specification has `early_stop >= trees`, `early_stop` is converted The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("rule_fit_predict") |> + dplyr::filter(engine == "xrf") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 3 x 2 +## mode type +## +## 1 regression numeric +## 2 classification class +## 3 classification prob +``` + ## References - Friedman and Popescu. "Predictive learning via rule ensembles." Ann. Appl. Stat. 2 (3) 916- 954, September 2008 diff --git a/man/rmd/survival_reg_flexsurv.Rmd b/man/rmd/survival_reg_flexsurv.Rmd index 03a83be46..db7aa83e6 100644 --- a/man/rmd/survival_reg_flexsurv.Rmd +++ b/man/rmd/survival_reg_flexsurv.Rmd @@ -66,6 +66,16 @@ For this engine, stratification cannot be specified via [`survival::strata()`], #| child: template-butcher.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurv") |> + dplyr::select(mode, type) + +``` ## References diff --git a/man/rmd/survival_reg_flexsurv.md b/man/rmd/survival_reg_flexsurv.md index e5be1c1a6..a2b93c4e9 100644 --- a/man/rmd/survival_reg_flexsurv.md +++ b/man/rmd/survival_reg_flexsurv.md @@ -60,6 +60,25 @@ The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that e This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the [butcher](https://butcher.tidymodels.org) package. +## Prediction types + + +``` r +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurv") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +``` ## References diff --git a/man/rmd/survival_reg_flexsurvspline.Rmd b/man/rmd/survival_reg_flexsurvspline.Rmd index 98d7b5a86..cbfd1514e 100644 --- a/man/rmd/survival_reg_flexsurvspline.Rmd +++ b/man/rmd/survival_reg_flexsurvspline.Rmd @@ -41,6 +41,16 @@ For this engine, stratification cannot be specified via [`survival::strata()`], #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurvspline") |> + dplyr::select(mode, type) + +``` ## Saving fitted model objects diff --git a/man/rmd/survival_reg_flexsurvspline.md b/man/rmd/survival_reg_flexsurvspline.md index 3e93458c8..eb95293e0 100644 --- a/man/rmd/survival_reg_flexsurvspline.md +++ b/man/rmd/survival_reg_flexsurvspline.md @@ -50,6 +50,25 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "flexsurvspline") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +``` ## Saving fitted model objects diff --git a/man/rmd/survival_reg_survival.Rmd b/man/rmd/survival_reg_survival.Rmd index 6af87749a..aa005aaa8 100644 --- a/man/rmd/survival_reg_survival.Rmd +++ b/man/rmd/survival_reg_survival.Rmd @@ -72,6 +72,17 @@ survival_reg() |> #| child: template-uses-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/survival_reg_survival.md b/man/rmd/survival_reg_survival.md index 84590d238..0529b51aa 100644 --- a/man/rmd/survival_reg_survival.md +++ b/man/rmd/survival_reg_survival.md @@ -86,6 +86,26 @@ This model can utilize case weights during model fitting. To use them, see the d The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("survival_reg_predict") |> + dplyr::filter(engine == "survival") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 censored regression time +## 2 censored regression quantile +## 3 censored regression hazard +## 4 censored regression survival +## 5 censored regression linear_pred +``` + ## Saving fitted model objects diff --git a/man/rmd/svm_linear_LiblineaR.Rmd b/man/rmd/svm_linear_LiblineaR.Rmd index 59fe25241..03bf2f5e3 100644 --- a/man/rmd/svm_linear_LiblineaR.Rmd +++ b/man/rmd/svm_linear_LiblineaR.Rmd @@ -78,6 +78,17 @@ Note that the `LiblineaR` engine does not produce class probabilities. When opti #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) + +``` + ## Sparse Data ```{r} diff --git a/man/rmd/svm_linear_LiblineaR.md b/man/rmd/svm_linear_LiblineaR.md index 3141e0c8c..a2b298d39 100644 --- a/man/rmd/svm_linear_LiblineaR.md +++ b/man/rmd/svm_linear_LiblineaR.md @@ -87,6 +87,25 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "LiblineaR") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 4 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification raw +``` + ## Sparse Data diff --git a/man/rmd/svm_linear_kernlab.Rmd b/man/rmd/svm_linear_kernlab.Rmd index 7bc5a089b..ad9576880 100644 --- a/man/rmd/svm_linear_kernlab.Rmd +++ b/man/rmd/svm_linear_kernlab.Rmd @@ -76,6 +76,17 @@ Note that the `"kernlab"` engine does not naturally estimate class probabilities #| child: template-no-case-weights.Rmd ``` +j## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "kernlab") |> + dplyr::select(mode, type) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/svm_linear_kernlab.md b/man/rmd/svm_linear_kernlab.md index 7284f7128..68858a789 100644 --- a/man/rmd/svm_linear_kernlab.md +++ b/man/rmd/svm_linear_kernlab.md @@ -85,6 +85,26 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +j## Prediction types + + +``` r +parsnip:::get_from_env("svm_linear_predict") |> + dplyr::filter(engine == "kernlab") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/svm_poly_kernlab.Rmd b/man/rmd/svm_poly_kernlab.Rmd index 161cc1584..0a78680f5 100644 --- a/man/rmd/svm_poly_kernlab.Rmd +++ b/man/rmd/svm_poly_kernlab.Rmd @@ -80,6 +80,16 @@ Note that the `"kernlab"` engine does not naturally estimate class probabilities #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("svm_poly_predict") |> + dplyr::select(mode, type) + +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#svm-poly-kernlab) for `svm_poly()` with the `"kernlab"` engine. diff --git a/man/rmd/svm_poly_kernlab.md b/man/rmd/svm_poly_kernlab.md index 8078d98a6..f1e1f0963 100644 --- a/man/rmd/svm_poly_kernlab.md +++ b/man/rmd/svm_poly_kernlab.md @@ -99,6 +99,25 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("svm_poly_predict") |> + dplyr::select(mode, type) +``` + +``` +## # A tibble: 5 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +``` + ## Examples The "Fitting and Predicting with parsnip" article contains [examples](https://parsnip.tidymodels.org/articles/articles/Examples.html#svm-poly-kernlab) for `svm_poly()` with the `"kernlab"` engine. diff --git a/man/rmd/svm_rbf_kernlab.Rmd b/man/rmd/svm_rbf_kernlab.Rmd index 17d9787bd..f20a0f379 100644 --- a/man/rmd/svm_rbf_kernlab.Rmd +++ b/man/rmd/svm_rbf_kernlab.Rmd @@ -80,6 +80,17 @@ Note that the `"kernlab"` engine does not naturally estimate class probabilities #| child: template-no-case-weights.Rmd ``` +## Prediction types + +```{r} +#| label: predict-types + +parsnip:::get_from_env("svm_rbf_predict") |> + dplyr::select(mode, type) |> + print(n = Inf) + +``` + ## Saving fitted model objects ```{r} diff --git a/man/rmd/svm_rbf_kernlab.md b/man/rmd/svm_rbf_kernlab.md index dd87cf199..5bfa0377f 100644 --- a/man/rmd/svm_rbf_kernlab.md +++ b/man/rmd/svm_rbf_kernlab.md @@ -93,6 +93,31 @@ scale each so that each predictor has mean zero and a variance of one. The underlying model implementation does not allow for case weights. +## Prediction types + + +``` r +parsnip:::get_from_env("svm_rbf_predict") |> + dplyr::select(mode, type) |> + print(n = Inf) +``` + +``` +## # A tibble: 10 x 2 +## mode type +## +## 1 regression numeric +## 2 regression raw +## 3 classification class +## 4 classification prob +## 5 classification raw +## 6 regression numeric +## 7 regression raw +## 8 classification class +## 9 classification prob +## 10 classification raw +``` + ## Saving fitted model objects diff --git a/man/rmd/template-bundle.md b/man/rmd/template-bundle.md new file mode 100644 index 000000000..2b7c06bc4 --- /dev/null +++ b/man/rmd/template-bundle.md @@ -0,0 +1 @@ +Models fitted with this engine may require native serialization methods to be properly saved and/or passed between R sessions. To learn more about preparing fitted models for serialization, see the bundle package. diff --git a/man/rmd/template-butcher.md b/man/rmd/template-butcher.md new file mode 100644 index 000000000..0df071983 --- /dev/null +++ b/man/rmd/template-butcher.md @@ -0,0 +1 @@ +This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the [butcher](https://butcher.tidymodels.org) package. diff --git a/man/rmd/template-censored-linear-predictor.md b/man/rmd/template-censored-linear-predictor.md new file mode 100644 index 000000000..228ef91d4 --- /dev/null +++ b/man/rmd/template-censored-linear-predictor.md @@ -0,0 +1,7 @@ +Since risk regression and parametric survival models are modeling different characteristics (e.g. relative hazard versus event time), their linear predictors will be going in opposite directions. + +For example, for parametric models, the linear predictor _increases with time_. For proportional hazards models the linear predictor _decreases with time_ (since hazard is increasing). As such, the linear predictors for these two quantities will have opposite signs. + +tidymodels does not treat different models differently when computing performance metrics. To standardize across model types, the default for proportional hazards models is to have _increasing values with time_. As a result, the sign of the linear predictor will be the opposite of the value produced by the `predict()` method in the engine package. + +This behavior can be changed by using the `increasing` argument when calling `predict()` on a \pkg{parsnip} model object. diff --git a/man/rmd/template-early-stopping.md b/man/rmd/template-early-stopping.md new file mode 100644 index 000000000..396201ada --- /dev/null +++ b/man/rmd/template-early-stopping.md @@ -0,0 +1,5 @@ +The `stop_iter()` argument allows the model to prematurely stop training if the objective function does not improve within `early_stop` iterations. + +The best way to use this feature is in conjunction with an _internal validation set_. To do this, pass the `validation` parameter of \\code{\\link[=xgb_train]{xgb_train()}} via the parsnip \\code{\\link[=set_engine]{set_engine()}} function. This is the proportion of the training set that should be reserved for measuring performance (and stopping early). + +If the model specification has `early_stop >= trees`, `early_stop` is converted to `trees - 1` and a warning is issued. diff --git a/man/rmd/template-gee-silent.md b/man/rmd/template-gee-silent.md new file mode 100644 index 000000000..a66b4ea79 --- /dev/null +++ b/man/rmd/template-gee-silent.md @@ -0,0 +1 @@ +The `gee::gee()` function always prints out warnings and output even when `silent = TRUE`. The parsnip `"gee"` engine, by contrast, silences all console output coming from `gee::gee()`, even if `silent = FALSE`. diff --git a/man/rmd/template-h2o-glm-penalty.md b/man/rmd/template-h2o-glm-penalty.md new file mode 100644 index 000000000..bd3c75bd0 --- /dev/null +++ b/man/rmd/template-h2o-glm-penalty.md @@ -0,0 +1,3 @@ +By default, when not given a fixed `penalty`, [h2o::h2o.glm()] uses a heuristic approach to select the optimal value of `penalty` based on training data. Setting the engine parameter `lambda_search` to `TRUE` enables an efficient version of the grid search, see more details at . + +The choice of `mixture` depends on the engine parameter `solver`, which is automatically chosen given training data and the specification of other model parameters. When `solver` is set to `'L-BFGS'`, `mixture` defaults to 0 (ridge regression) and 0.5 otherwise. diff --git a/man/rmd/template-h2o-init.md b/man/rmd/template-h2o-init.md new file mode 100644 index 000000000..9b917cd9d --- /dev/null +++ b/man/rmd/template-h2o-init.md @@ -0,0 +1,5 @@ +To use the h2o engine with tidymodels, please run `h2o::h2o.init()` first. By default, This connects R to the local h2o server. This needs to be done in every new R session. You can also connect to a remote h2o server with an IP address, for more details see [h2o::h2o.init()]. + +You can control the number of threads in the thread pool used by h2o with the `nthreads` argument. By default, it uses all CPUs on the host. This is different from the usual parallel processing mechanism in tidymodels for tuning, while tidymodels parallelizes over resamples, h2o parallelizes over hyperparameter combinations for a given resample. + +h2o will automatically shut down the local h2o instance started by R when R is terminated. To manually stop the h2o server, run `h2o::h2o.shutdown()`. diff --git a/man/rmd/template-makes-dummies.md b/man/rmd/template-makes-dummies.md new file mode 100644 index 000000000..24c496237 --- /dev/null +++ b/man/rmd/template-makes-dummies.md @@ -0,0 +1 @@ +Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \\code{\\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators. diff --git a/man/rmd/template-mtry-prop.md b/man/rmd/template-mtry-prop.md new file mode 100644 index 000000000..b5b67d771 --- /dev/null +++ b/man/rmd/template-mtry-prop.md @@ -0,0 +1,7 @@ +The `mtry` argument denotes the number of predictors that will be randomly sampled at each split when creating tree models. + +Some engines, such as `"xgboost"`, `"xrf"`, and `"lightgbm"`, interpret their analogue to the `mtry` argument as the _proportion_ of predictors that will be randomly sampled at each split rather than the _count_. In some settings, such as when tuning over preprocessors that influence the number of predictors, this parameterization is quite helpful---interpreting `mtry` as a proportion means that `[0, 1]` is always a valid range for that parameter, regardless of input data. + +parsnip and its extensions accommodate this parameterization using the `counts` argument: a logical indicating whether `mtry` should be interpreted as the number of predictors that will be randomly sampled at each split. `TRUE` indicates that `mtry` will be interpreted in its sense as a count, `FALSE` indicates that the argument will be interpreted in its sense as a proportion. + +`mtry` is a main model argument for \\code{\\link[=boost_tree]{boost_tree()}} and \\code{\\link[=rand_forest]{rand_forest()}}, and thus should not have an engine-specific interface. So, regardless of engine, `counts` defaults to `TRUE`. For engines that support the proportion interpretation (currently `"xgboost"` and `"xrf"`, via the rules package, and `"lightgbm"` via the bonsai package) the user can pass the `counts = FALSE` argument to `set_engine()` to supply `mtry` values within `[0, 1]`. diff --git a/man/rmd/template-no-case-weights.md b/man/rmd/template-no-case-weights.md new file mode 100644 index 000000000..e096d2385 --- /dev/null +++ b/man/rmd/template-no-case-weights.md @@ -0,0 +1 @@ +The underlying model implementation does not allow for case weights. diff --git a/man/rmd/template-no-pooling.md b/man/rmd/template-no-pooling.md new file mode 100644 index 000000000..b6b8ef2f1 --- /dev/null +++ b/man/rmd/template-no-pooling.md @@ -0,0 +1,20 @@ +## Predicting new samples + +This model can use subject-specific coefficient estimates to make predictions (i.e. partial pooling). For example, this equation shows the linear predictor (`\eta`) for a random intercept: + +``` +\eta_{i} = (\beta_0 + b_{0i}) + \beta_1x_{i1} +``` + +where `i` denotes the `i`th independent experimental unit (e.g. subject). When the model has seen subject `i`, it can use that subject's data to adjust the _population_ intercept to be more specific to that subjects results. + +What happens when data are being predicted for a subject that was not used in the model fit? In that case, this package uses _only_ the population parameter estimates for prediction: + +``` +\hat{\eta}_{i'} = \hat{\beta}_0+ \hat{\beta}x_{i'1} +``` + +Depending on what covariates are in the model, this might have the effect of making the same prediction for all new samples. The population parameters are the "best estimate" for a subject that was not included in the model fit. + +The tidymodels framework deliberately constrains predictions for new data to not use the training set or other data (to prevent information leakage). + diff --git a/man/rmd/template-same-scale.md b/man/rmd/template-same-scale.md new file mode 100644 index 000000000..5dc46fc6c --- /dev/null +++ b/man/rmd/template-same-scale.md @@ -0,0 +1,2 @@ +Predictors should have the same scale. One way to achieve this is to center and +scale each so that each predictor has mean zero and a variance of one. diff --git a/man/rmd/template-spark-notes.md b/man/rmd/template-spark-notes.md new file mode 100644 index 000000000..b1cdb76c9 --- /dev/null +++ b/man/rmd/template-spark-notes.md @@ -0,0 +1,6 @@ +For models created using the `"spark"` engine, there are several things to consider. + +* Only the formula interface to via `fit()` is available; using `fit_xy()` will generate an error. +* The predictions will always be in a Spark table format. The names will be the same as documented but without the dots. +* There is no equivalent to factor columns in Spark tables so class predictions are returned as character columns. +* To retain the model object for a new R session (via `save()`), the `model$fit` element of the parsnip object should be serialized via `ml_save(object$fit)` and separately saved to disk. In a new session, the object can be reloaded and reattached to the parsnip object. diff --git a/man/rmd/template-survival-mean.md b/man/rmd/template-survival-mean.md new file mode 100644 index 000000000..695318ccf --- /dev/null +++ b/man/rmd/template-survival-mean.md @@ -0,0 +1,2 @@ + +Predictions of type `"time"` are predictions of the mean survival time. diff --git a/man/rmd/template-survival-median.md b/man/rmd/template-survival-median.md new file mode 100644 index 000000000..54f32946e --- /dev/null +++ b/man/rmd/template-survival-median.md @@ -0,0 +1,2 @@ + +Predictions of type `"time"` are predictions of the median survival time. diff --git a/man/rmd/template-tree-split-factors.md b/man/rmd/template-tree-split-factors.md new file mode 100644 index 000000000..efd28f910 --- /dev/null +++ b/man/rmd/template-tree-split-factors.md @@ -0,0 +1 @@ +This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. `{a, c}` vs `{b, d}`) when splitting at a node. Dummy variables are not required for this model. diff --git a/man/rmd/template-uses-case-weights.md b/man/rmd/template-uses-case-weights.md new file mode 100644 index 000000000..f7cf35aaa --- /dev/null +++ b/man/rmd/template-uses-case-weights.md @@ -0,0 +1,3 @@ +This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`. + +The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights. diff --git a/man/rmd/template-uses-sparse-data.md b/man/rmd/template-uses-sparse-data.md new file mode 100644 index 000000000..a9b4605ff --- /dev/null +++ b/man/rmd/template-uses-sparse-data.md @@ -0,0 +1 @@ +This model can utilize sparse data during model fitting and prediction. Both sparse matrices such as dgCMatrix from the `Matrix` package and sparse tibbles from the `sparsevctrs` package are supported. See [sparse_data] for more information. diff --git a/man/rmd/template-zv-conditional.md b/man/rmd/template-zv-conditional.md new file mode 100644 index 000000000..40182f1ca --- /dev/null +++ b/man/rmd/template-zv-conditional.md @@ -0,0 +1,3 @@ +Variance calculations are used in these computations within each outcome class. For this reason, _zero-variance_ predictors (i.e., with a single unique value) within each class should be eliminated before fitting the model. + + diff --git a/man/rmd/template-zv.md b/man/rmd/template-zv.md new file mode 100644 index 000000000..d9436b240 --- /dev/null +++ b/man/rmd/template-zv.md @@ -0,0 +1,3 @@ +Variance calculations are used in these computations so _zero-variance_ predictors (i.e., with a single unique value) should be eliminated before fitting the model. + +