
Returns the leaf nodes that are responsible for predictions for a given dataset.
Source:R/YARF_node_info.R
prediction_nodes.RdReturns the leaf nodes that are responsible for predictions for a given dataset.
Arguments
- yarf_mod
A YARF model object.
- X
A n* x p data frame where each row is an observation you wish to obtain prediction information. Here, p is the same length as the original training data and the column names match the original training data. If a matrix object is passed in, it is automatically cast to a data frame. This may not always give you what you want. If
NULL(the default), then this parameter is set to the model's training data.- oob_only
If
XisNULL, setting this toTRUE(the default) will only return node information for trees where each observation is out-of-bag. IfXis notNULL, this parameter has no effect on output.