predict.CART: predict.CART

View source: R/cart.R

predict.CARTR Documentation

predict.CART

Description

Predicts values for numeric outcomes and group membership for categories based on newdata and a fitted CART object. A value (which may be NA) is returned for every instance in newdata including those with missing data. NA is returned for cases with unfitted factor levels.

Usage

## S3 method for class 'CART'
predict(object, newdata = NULL, seed = 1232, ...)

Arguments

object

A CART object.

newdata

Optionally, a data frame including the variables used to fit the model. If omitted, the data supplied to CART() is used before any filtering.

seed

A random number seed to ensure stability of predictions.

...

Extra parameters. Currently not used.


NumbersInternational/flipTrees documentation built on Feb. 26, 2024, 6:45 a.m.