Skip to contents

Predict from a greedy concentration-index forest

Usage

# S3 method for class 'ci_forest'
predict(
  object,
  newdata = NULL,
  type = c("response", "node"),
  OOB = FALSE,
  FUN = NULL,
  ...
)

Arguments

object

A fitted ci_forest object from ci_forest().

newdata

Optional data for prediction. If omitted, the training data stored in object are used.

type

Prediction type. "response" returns averaged terminal-node summaries. "node" returns terminal node ids for each tree.

OOB

Should predictions for training rows use only trees where the row was out-of-bag?

FUN

Optional function with signature function(y, w) used to summarize terminal nodes. By default, the weighted mean of outcome_name is used.

...

Currently ignored.

Value

A numeric vector for type = "response" or an integer matrix for type = "node".