pp_tree: Parsnip model specification for pptr.

View source: R/parsnip.R

pp_treeR Documentation

Parsnip model specification for pptr.

Description

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. Either "classification" or "regression".

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 (requireNamespace("parsnip", quietly = TRUE)) {
  library(parsnip)
  spec <- pp_tree(penalty = 0) %>% set_engine("ppforest2")
  fit <- spec %>% fit(Species ~ ., data = iris)
  predict(fit, iris)
}


ppforest2 documentation built on July 21, 2026, 9:07 a.m.