Skip to content

Models

auto_ml()
Automatic Machine Learning
bag_mars()
Ensembles of MARS models
bag_mlp()
Ensembles of neural networks
bag_tree()
Ensembles of decision trees
bart()
Bayesian additive regression trees (BART)
boost_tree()
Boosted trees
cubist_rules()
Cubist rule-based regression models
C5_rules()
C5.0 rule-based classification models
decision_tree()
Decision trees
discrim_flexible()
Flexible discriminant analysis
discrim_linear()
Linear discriminant analysis
discrim_quad()
Quadratic discriminant analysis
discrim_regularized()
Regularized discriminant analysis
gen_additive_mod()
Generalized additive models (GAMs)
glm_grouped()
Fit a grouped binomial outcome from a data set with case weights
linear_reg()
Linear regression
logistic_reg()
Logistic regression
mars()
Multivariate adaptive regression splines (MARS)
mlp()
Single layer neural network
multinom_reg()
Multinomial regression
naive_Bayes()
Naive Bayes models
nearest_neighbor()
K-nearest neighbors
null_model()
Null model
pls()
Partial least squares (PLS)
poisson_reg()
Poisson regression models
proportional_hazards()
Proportional hazards regression
rand_forest()
Random forest
rule_fit()
RuleFit models
survival_reg()
Parametric survival regression
svm_linear()
Linear support vector machines
svm_poly()
Polynomial support vector machines
svm_rbf()
Radial basis function support vector machines

Infrastructure

autoplot(<model_fit>) autoplot(<glmnet>)
Create a ggplot for a model object
add_rowindex()
Add a column of row numbers to a data frame
augment(<model_fit>)
Augment data with predictions
case_weights
Using case weights with parsnip
case_weights_allowed()
Determine if case weights are used
.cols() .preds() .obs() .lvls() .facts() .x() .y() .dat()
Data Set Characteristics Available when Fitting Models
extract_spec_parsnip(<model_fit>) extract_fit_engine(<model_fit>) extract_parameter_set_dials(<model_spec>) extract_parameter_dials(<model_spec>)
Extract elements of a parsnip model object
fit(<model_spec>) fit_xy(<model_spec>)
Fit a Model Specification to a Dataset
reexports autoplot %>% fit fit_xy tidy glance augment required_pkgs extract_spec_parsnip extract_fit_engine extract_parameter_set_dials extract_parameter_dials tune frequency_weights importance_weights varying_args
Objects exported from other packages
control_parsnip()
Control the fit function
glance(<model_fit>)
Construct a single row summary "glance" of a model, fit, or other object
model_fit
Model Fit Object Information
model_formula
Formulas with special terms in tidymodels
model_spec
Model Specification Information
multi_predict multi_predict.default multi_predict._xgb.Booster multi_predict._C5.0 multi_predict._elnet multi_predict._lognet multi_predict._multnet multi_predict._glmnetfit multi_predict._earth multi_predict._torch_mlp multi_predict._train.kknn
Model predictions across many sub-models
parsnip_addin()
Start an RStudio Addin that can write model specifications
predict(<model_fit>) predict_raw()
Model predictions
repair_call()
Repair a model call object
set_args() set_mode()
Change elements of a model specification
set_engine()
Declare a computational engine and specific arguments
show_engines()
Display currently available engines for a model
tidy(<model_fit>)
Turn a parsnip model object into a tidy tibble
translate()
Resolve a Model Specification for a Computational Engine
update(<bag_mars>) update(<bag_mlp>) update(<bag_tree>) update(<bart>) update(<boost_tree>) update(<C5_rules>) update(<cubist_rules>) update(<decision_tree>) update(<discrim_flexible>) update(<discrim_linear>) update(<discrim_quad>) update(<discrim_regularized>) update(<gen_additive_mod>) update(<linear_reg>) update(<logistic_reg>) update(<mars>) update(<mlp>) update(<multinom_reg>) update(<naive_Bayes>) update(<nearest_neighbor>) update(<pls>) update(<poisson_reg>) update(<proportional_hazards>) update(<rand_forest>) update(<rule_fit>) update(<surv_reg>) update(<survival_reg>) update(<svm_linear>) update(<svm_poly>) update(<svm_rbf>)
Updating a model specification
ctree_train() cforest_train()
A wrapper function for conditional inference tree models

Developer tools

condense_control()
Condense control object into strictly smaller control object
contr_one_hot()
Contrast function for one-hot encodings
set_new_model() set_model_mode() set_model_engine() set_model_arg() set_dependency() get_dependency() set_fit() get_fit() set_pred() get_pred_type() show_model_info() pred_value_template() set_encoding() get_encoding()
Tools to Register Models
maybe_matrix() maybe_data_frame()
Fuzzy conversions
min_cols() min_rows()
Execution-time data dimension checks
max_mtry_formula()
Determine largest value of mtry from formula. This function potentially caps the value of mtry based on a formula and data set. This is a safe approach for survival and/or multivariate models.
reexports autoplot %>% fit fit_xy tidy glance augment required_pkgs extract_spec_parsnip extract_fit_engine extract_parameter_set_dials extract_parameter_dials tune frequency_weights importance_weights varying_args
Objects exported from other packages
required_pkgs(<model_spec>) required_pkgs(<model_fit>)
Determine required packages for a model
req_pkgs()
Determine required packages for a model
.extract_surv_status
Extract survival status
.extract_surv_time
Extract survival time
.model_param_name_key()
Translate names of model tuning parameters