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

View source: R/generic-s3.R

predict.morf.forestR Documentation

Prediction Method for morf.forest Objects

Description

Prediction method for class morf.forest.

Usage

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

Arguments

object

An morf.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

See Also

morf, marginal_effects


morf documentation built on March 31, 2023, 8:14 p.m.