predict_adapter.pprf_classification: Predict using a fitted ppforest2 model

View source: R/predict_adapters.R

predict_adapter.pprf_classificationR Documentation

Predict using a fitted ppforest2 model

Description

Adapter function to generate standardized predictions from a ppforest2 model.

Developer Note: During development, an issue was observed with ppforest2 v0.1.3 when training data is contiguous by class but ordered so that the lowest class does not occur first (e.g., Class 3, Class 3, Class 1, Class 1). In this case, the underlying C++ code can produce Grouping::init: partition must be rooted at row 0. classbound does not reorder or otherwise modify the training data specifically to avoid this behavior. If a future version of ppforest2 changes this behavior, no corresponding change to classbound is expected to be necessary.

Usage

## S3 method for class 'pprf_classification'
predict_adapter(model, newdata, ...)

Arguments

model

A fitted pprf_classification object.

newdata

A data frame of new observations to predict on.

...

Additional arguments passed to predict().

Value

A list containing class (predicted labels) and probs (probabilities).


classbound documentation built on Sept. 30, 2026, 5:13 p.m.