Previous chapter
The Model ZooIntroduction to the Model Zoo
Next chapter

The Model Zoo

{width=30%}

The parsnip package supports numerous (supervised) machine learning models through a uniform interface. The interface has the general form

model_name() %>%
  set_engine("<engine_name>") %>%
  fit(target ~ predictors, data = dataset_name)

which includes the specification of the model, the engine and the fitting formula. The interface thus allows developers to change models and engines quite easily. The most important model families supported by parsnip are:

  • Linear: Including linear regression and logistic regression.
  • Tree-Based: Decision trees, random forests (bagged trees), boosted trees
  • Neural-Networks: Multi-Layer Perceptrons
  • Support Vector Machines

The next section lists all avaialble models for classification and regression.

Classification Models

The list below shows all classification models available including the supported engines and features.

modelengineclassconf_intpred_intprobraw
boost_tree()C5.0××
spark×××
xgboost××
decision_tree()C5.0××
rpart××
spark×××
logistic_reg()glm×
glmnet××
keras×××
spark×××
stan
mars()earth××
mlp()keras××
nnet××
multinom_reg()glmnet××
keras×××
nnet××
spark×××
nearest_neighbor()kknn××
null_model()parsnip××
rand_forest()randomForest××
ranger×
spark×××
svm_poly()kernlab××
svm_rbf()kernlab××

Regression Models

The list below shows all regression models available including the supported engines and features.

modelengineconf_intnumericpred_intquantileraw
boost_tree()spark××××
xgboost×××
decision_tree()rpart×××
spark××××
linear_reg()glmnet×××
keras××××
lm×
spark××××
stan×
mars()earth×××
mlp()keras×××
nnet×××
nearest_neighbor()kknn×××
null_model()parsnip×××
rand_forest()randomForest×××
ranger××
spark××××
surv_reg()flexsurv×××
survival×××
svm_poly()kernlab×××
svm_rbf()kernlab×××

Parameter Mappings

parsnip uses standardized parameter names to have some consistency between models and engines. The mapping between the parsnip arguments and their original names is: