% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ppmodel.R
\name{oob_error}
\alias{oob_error}
\title{Out-of-bag error for a random forest.}
\usage{
oob_error(model)
}
\arguments{
\item{model}{A \code{pprf} forest model.}
}
\value{
A numeric scalar in `[0, 1]` for classification or `[0, Inf)` for
  regression. Returns `NA_real_` when no observation has any out-of-bag
  tree (e.g. a degenerate forest where every tree saw every row). Callers
  should check with `is.na()` rather than comparing against a sentinel
  value; in earlier versions this condition was signalled as `-1`, which
  was not distinguishable from a (mathematically impossible but
  representable) error rate.
}
\description{
Computes (or returns the cached) OOB error using the training data stored
on the model. For classification, this is the misclassification rate in
`[0, 1]`. For regression, it is the mean squared error against the
continuous response.
}
\seealso{
\code{\link{oob_predictions}}, \code{\link{oob_samples}}
}
