honest_predictions_cpp: Honest Out-of-Sample Predictions

View source: R/RcppExports.R

honest_predictions_cppR Documentation

Honest Out-of-Sample Predictions

Description

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

Usage

honest_predictions_cpp(
  unique_leaves_honest,
  y_m,
  y_m_1,
  honest_leaves,
  test_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.

test_leaves

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


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