Skip to contents

Creates a model specification for a single Projection Pursuit decision tree. Use set_engine("ppforest2") to select the ppforest2 engine.

Usage

pp_tree(mode = "classification", penalty = NULL)

Arguments

mode

A character string for the model type. Only "classification" is supported.

penalty

The regularization parameter (maps to lambda).

Value

A parsnip model specification.

See also

pptr for the underlying training function, pp_rand_forest for forests

Examples

if (FALSE) { # \dontrun{
library(parsnip)
spec <- pp_tree(penalty = 0) %>% set_engine("ppforest2")
fit <- spec %>% fit(Type ~ ., data = iris)
predict(fit, iris)
} # }