predict_adapter.rpart: Predict using a fitted rpart model

View source: R/predict_adapters.R

predict_adapter.rpartR Documentation

Predict using a fitted rpart model

Description

Adapter function to generate standardized predictions from an rpart model.

Usage

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

Arguments

model

A fitted rpart 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.