predict.ocf.forest: Prediction Method for ocf.forest Objects

View source: R/generic-s3.R

predict.ocf.forestR Documentation

Prediction Method for ocf.forest Objects

Description

Prediction method for class ocf.forest.

Usage

## S3 method for class 'ocf.forest'
predict(object, data, type = "response", ...)

Arguments

object

An ocf.forest object.

data

Data set of class data.frame. It must contain at least the same covariates used to train the forests.

type

Type of prediction. Either "response" or "terminalNodes".

...

Further arguments passed to or from other methods.

Details

If type === "response" (the default), the predicted conditional class probabilities are returned. If forests are honest, these predictions are honest.

If type == "terminalNodes", the IDs of the terminal node in each tree for each observation in data are returned.

Value

Prediction results.

Author(s)

Riccardo Di Francesco

References

  • Di Francesco, R. (2025). Ordered Correlation Forest. Econometric Reviews, 1–17. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/07474938.2024.2429596")}.

See Also

ocf, marginal_effects


ocf documentation built on April 4, 2025, 4:44 a.m.