Learn R Programming

morf (version 1.0.0)

honest_fitted: Honest In-Sample Predictions

Description

Computes honest in-sample predictions for an morf.forest object.

Usage

honest_fitted(forest, train_sample, honest_sample, y_m_honest, y_m_1_honest)

Value

In-sample honest predictions.

Arguments

forest

An morf.forest object.

train_sample

Training sample.

honest_sample

Honest sample.

y_m_honest

Indicator variable, whether the outcome is smaller than or equal to the m-th class.

y_m_1_honest

Indicator variable, whether the outcome is smaller than or equal to the (m-1)-th class.

Details

forest must have been grown using only the training sample. honest_fitted replaces the leaf estimates using the outcome from the honest sample (using the prediction method of morf).