
Computes information about the "proximity" of observations within the YARF model. Given two datasets, information is computed for all pairs of observations. Information returned is the prediction nodes (for all trees) for both objects and their common node in the tree structure plus much information about the nodes.
Source:R/YARF_node_info.R
compute_raw_proximity_info.RdComputes information about the "proximity" of observations within the YARF model. Given two datasets, information is computed for all pairs of observations. Information returned is the prediction nodes (for all trees) for both objects and their common node in the tree structure plus much information about the nodes.
Usage
compute_raw_proximity_info(
yarf_mod,
X1 = NULL,
X2 = NULL,
oob_only_1 = TRUE,
oob_only_2 = TRUE,
verbose = TRUE
)Arguments
- yarf_mod
A YARF model object.
- X1
A n* x p matrix where each row is an observation. If
NULL(the default), then this parameter is set to the model's training data.- X2
A n x p matrix where each row is an observation. If
NULL(the default), then this parameter is set to the model's training data.- oob_only_1
TRUE(the default) will only return proximity information for trees where each observation is out-of-bag. IfX1is notNULL, this parameter has no effect on output.- oob_only_2
TRUE(the default) will only return proximity information for trees where each observation is out-of-bag. IfX2is notNULL, this parameter has no effect on output.- verbose
Print out periodic messages on progress of the computation of the proximity information. The default is
TRUE.
Value
A list indexed by the row number of X1 whose elements are a list indexed by
the row number of X2 whose elements are a list indexed by tree number whose
elements are a list consisting of the following information: (a) X1 prediction node
(b) X2 prediction node, (c) shared node, (d) locations of all three nodes indicating
left/right directions, (e) depth differences to shared node where 0 indicates they
are in the same node, (f) parent node's cost for all three (where the parent cost
of the root is the null model cost)