predict.pptr_classification: Predicts labels or per-group one-hot proportions from a pptr...

View source: R/pptr.R

predict.pptr_classificationR Documentation

Predicts labels or per-group one-hot proportions from a pptr model (classification mode).

Description

Predicts labels or per-group one-hot proportions from a pptr model (classification mode).

Usage

## S3 method for class 'pptr_classification'
predict(object, new_data = NULL, type = NULL, ...)

Arguments

object

A pptr_classification model.

new_data

A data frame or matrix of new observations. If NULL, the first positional argument in ... is used for backward compatibility.

type

"class" (default) returns a factor of predicted labels; "prob" returns a data frame with 1.0 for the predicted group and 0.0 elsewhere.

...

Backward-compat positional 'new_data'.

Value

A factor or data frame.

See Also

pptr, predict.pptr_regression


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