% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parsnip.R
\name{pp_tree}
\alias{pp_tree}
\title{Parsnip model specification for pptr.}
\usage{
pp_tree(mode = "classification", penalty = NULL)
}
\arguments{
\item{mode}{A character string for the model type. Either \code{"classification"} or \code{"regression"}.}

\item{penalty}{The regularization parameter (maps to \code{lambda}).}
}
\value{
A parsnip model specification.
}
\description{
Creates a model specification for a single Projection Pursuit decision tree.
Use \code{set_engine("ppforest2")} to select the ppforest2 engine.
}
\examples{
\donttest{
if (requireNamespace("parsnip", quietly = TRUE)) {
  library(parsnip)
  spec <- pp_tree(penalty = 0) \%>\% set_engine("ppforest2")
  fit <- spec \%>\% fit(Species ~ ., data = iris)
  predict(fit, iris)
}
}
}
\seealso{
\code{\link{pptr}} for the underlying training function, \code{\link{pp_rand_forest}} for forests
}
