This is the list of models tidypredict can parse: 43 fitted model classes from 30 modeling packages.
tidypredict dispatches on the class of the fitted model, so a model is supported if the “Fit with” column covers how it was fitted. Models fitted through parsnip are unwrapped and handed to the same code, so the “parsnip” column is not a separate list of capabilities: it names the spec and engine that produce each fitted class. A blank there means tidypredict has no test for that route, not that it is known to fail.
Regression
| Model | Fit with | parsnip | Details |
|---|---|---|---|
| Linear regression | stats::lm() |
linear_reg(engine = "lm") |
article |
| Generalized linear regression | stats::glm() |
linear_reg(engine = "glm"),
logistic_reg(engine = "glm")
|
article |
| Regularized regression | glmnet::glmnet() |
linear_reg(), logistic_reg(),
multinom_reg() with engine = "glmnet"
|
article |
| Regularized linear models | LiblineaR::LiblineaR() |
logistic_reg(engine = "LiblineaR"),
svm_linear(engine = "LiblineaR")
|
|
| Quantile regression |
quantreg::rq(), quantreg::rqs()
|
linear_reg(engine = "quantreg") |
|
| Multinomial regression | nnet::multinom() |
multinom_reg(engine = "nnet") |
article |
| Support vector machine | kernlab::ksvm() |
svm_linear(engine = "kernlab") |
|
| Neural network | nnet::nnet() |
mlp(engine = "nnet") |
article |
| MARS | earth::earth() |
mars(engine = "earth") |
article |
| Partial least squares |
mixOmics::pls(), spls(),
plsda(), splsda()
|
pls(engine = "mixOmics") |
article |
| Null model | parsnip::nullmodel() |
null_model() |
article |
Classification and discriminant analysis
| Model | Fit with | parsnip | Details |
|---|---|---|---|
| Naive Bayes |
naivebayes::naive_bayes(),
klaR::NaiveBayes()
|
naive_Bayes() with engine = "naivebayes"
or "klaR"
|
article |
| Linear discriminant analysis | MASS::lda() |
discrim_linear(engine = "MASS") |
article |
| Quadratic discriminant analysis | MASS::qda() |
discrim_quad(engine = "MASS") |
article |
| Flexible discriminant analysis | mda::fda() |
discrim_linear(engine = "mda") |
article |
| Shrinkage discriminant analysis | sda::sda() |
discrim_linear(engine = "sda") |
article |
| Regularized discriminant analysis |
sparsediscrim::lda_diag(),
lda_shrink_mean(), lda_shrink_cov(),
lda_emp_bayes_eigen()
|
discrim_linear(engine = "sparsediscrim") |
article |
Trees and forests
| Model | Fit with | parsnip | Details |
|---|---|---|---|
| Decision tree | rpart::rpart() |
decision_tree(engine = "rpart") |
article |
| Decision tree | C50::C5.0() |
decision_tree(engine = "C5.0"),
C5_rules(engine = "C5.0")
|
article |
| Conditional inference tree | partykit::ctree() |
article | |
| Random forest | randomForest::randomForest() |
rand_forest(engine = "randomForest") |
article |
| Random forest | ranger::ranger() |
rand_forest(engine = "ranger") |
article |
| Conditional inference forest | partykit::cforest() |
rand_forest(engine = "partykit") |
article |
| Oblique random forest | aorsf::orsf() |
rand_forest(engine = "aorsf") |
article |
| Bagged trees | baguette::bagger() |
bag_tree() with engine = "rpart" or
"C5.0"
|
article |
| BART | dbarts::bart() |
bart(engine = "dbarts") |
article |
Boosting and rules
| Model | Fit with | parsnip | Details |
|---|---|---|---|
| XGBoost | xgboost::xgb.train() |
boost_tree(engine = "xgboost") |
article |
| LightGBM | lightgbm::lgb.train() |
boost_tree(engine = "lightgbm"), via bonsai |
article |
| CatBoost | catboost::catboost.train() |
boost_tree(engine = "catboost"), via bonsai |
article |
| Boosted C5.0 trees |
C50::C5.0() with trials
|
boost_tree(engine = "C5.0") |
article |
| Model-based boosting | mboost::blackboost() |
||
| Cubist | Cubist::cubist() |
cubist_rules(engine = "Cubist") |
article |
| RuleFit | xrf::xrf() |
rule_fit(engine = "xrf") |
|
| H2O gradient boosting | h2o::h2o.gbm() |
boost_tree(engine = "h2o_gbm"), via agua |
article |
| H2O RuleFit | h2o::h2o.rulefit() |
rule_fit(engine = "h2o"), via agua |
article |
Intervals
tidypredict_interval() and
tidypredict_sql_interval() are narrower than
tidypredict_fit(): they only support lm() and
glm() models.
Adding a model
If a model you need is missing, open an
issue. CONTRIBUTING.md describes what a new model
needs, and the non-R models article covers the
other direction: writing a parsed model spec by hand so a model fitted
outside R can be used here.
