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

\item{trees}{The number of trees in the forest (maps to \code{size}).}

\item{mtry}{The number of variables to consider at each split (maps to \code{n_vars}).}

\item{mtry_prop}{The proportion of variables to consider at each split (maps to \code{p_vars}). An alternative to \code{mtry} that expresses the feature subsample as a fraction in (0, 1], tunable via the \code{dials} \code{mtry_prop()} parameter. Supply \code{mtry} or \code{mtry_prop}, not both.}

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