Models.Rmd
parsnip
contains wrappers for a number of models. For example, the parsnip
function rand_forest()
can be used to create a random forest model. The mode of a model is related to its goal. Examples would be regression and classification.
The list of models accessible via parsnip
is:
classification: boost_tree()
, decision_tree()
, logistic_reg()
, mars()
, mlp()
, multinom_reg()
, nearest_neighbor()
, rand_forest()
, svm_poly()
, svm_rbf()
regression: boost_tree()
, decision_tree()
, linear_reg()
, mars()
, mlp()
, nearest_neighbor()
, rand_forest()
, surv_reg()
, svm_poly()
, svm_rbf()
How the model is created is related to the engine. In many cases, this is an R modeling package. In others, it may be a connection to an external system (such as Spark or Tensorflow). This table lists the engines for each model type along with the type of prediction that it can make (see predict.model_fit()
).
model  engine 
class

classprob

conf_int

numeric

pred_int

quantile

raw


boost_tree()

C5.0  ✔  ✔  ×  ×  ×  ×  ✔ 
spark  ✔  ✔  ×  ✔  ×  ×  ×  
xgboost  ✔  ✔  ×  ✔  ×  ×  ✔  
decision_tree()

C5.0  ✔  ✔  ×  ×  ×  ×  ✔ 
rpart  ✔  ✔  ×  ✔  ×  ×  ✔  
spark  ✔  ✔  ×  ✔  ×  ×  ×  
linear_reg()

glmnet  ×  ×  ×  ✔  ×  ×  ✔ 
keras  ×  ×  ×  ✔  ×  ×  ×  
lm  ×  ×  ✔  ✔  ✔  ×  ✔  
spark  ×  ×  ×  ✔  ×  ×  ×  
stan  ×  ×  ✔  ✔  ✔  ×  ✔  
logistic_reg()

glm  ✔  ✔  ✔  ×  ×  ×  ✔ 
glmnet  ✔  ✔  ×  ×  ×  ×  ✔  
keras  ✔  ✔  ×  ×  ×  ×  ×  
spark  ✔  ✔  ×  ×  ×  ×  ×  
stan  ✔  ✔  ✔  ×  ✔  ×  ✔  
mars()

earth  ✔  ✔  ×  ✔  ×  ×  ✔ 
mlp()

keras  ✔  ✔  ×  ✔  ×  ×  ✔ 
nnet  ✔  ✔  ×  ✔  ×  ×  ✔  
multinom_reg()

glmnet  ✔  ✔  ×  ×  ×  ×  ✔ 
keras  ✔  ✔  ×  ×  ×  ×  ×  
spark  ✔  ✔  ×  ×  ×  ×  ×  
nearest_neighbor()

kknn  ✔  ✔  ×  ✔  ×  ×  ✔ 
rand_forest()

randomForest  ✔  ✔  ×  ✔  ×  ×  ✔ 
ranger  ✔  ✔  ✔  ✔  ×  ×  ✔  
spark  ✔  ✔  ×  ✔  ×  ×  ×  
surv_reg()

flexsurv  ×  ×  ×  ✔  ×  ✔  × 
survreg  ×  ×  ×  ✔  ×  ✔  ×  
svm_poly()

kernlab  ✔  ✔  ×  ✔  ×  ×  ✔ 
svm_rbf()

kernlab  ✔  ✔  ×  ✔  ×  ×  ✔ 
Models can be added by the user too. See the “Making a parsnip
model from scratch” vignette.