Learn R Programming

morf (version 1.0.0)

forest_weights_predicted_cpp: Forest Out-of-Sample Honest Weights

Description

Computes forest out-of-sample honest weights for a morf.forest object relative to the m-th class.

Usage

forest_weights_predicted_cpp(
  leaf_IDs_test_list,
  leaf_IDs_honest_list,
  leaf_size_honest_list,
  w
)

Arguments

leaf_IDs_test_list

List of size n.trees, storing the leaf of each tree where training units fall into.

leaf_IDs_honest_list

List of size n.trees, storing the leaf of each tree where honest units fall into.

leaf_size_honest_list

List of size n.trees, storing the size of the leaves of each tree computed with honest units.

w

1 if marginal effects are being computed, 0 otherwise for normal prediction.