honest_fitted_cpp: Honest In-Sample Predictions

View source: R/RcppExports.R

honest_fitted_cppR Documentation

Honest In-Sample Predictions

Description

Computes honest in-sample predictions for a ocf.forest object relative to the desired class.

Usage

honest_fitted_cpp(
  unique_leaves_honest,
  y_m,
  y_m_1,
  honest_leaves,
  train_leaves
)

Arguments

unique_leaves_honest

List of size n.trees, storing the unique leaf ids of each tree relative to the honest sample.

y_m

Indicator variable, equal to 1 if the y is lower or equal than the m-th class and zero otherwise.

y_m_1

Indicator variable, equal to 1 if the y is lower or equal than the (m-1)-th class and zero otherwise.

honest_leaves

Matrix of size (n.samples x n.trees). The i-th row stores the id of the leaf where the i-th honest observation falls in each tree.

train_leaves

Matrix of size (n.samples x n.trees). The i-th row stores the id of the leaf where the i-th training observation falls in each tree.


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