This function counts surrogate variables and returns the total average number of surrogate variables and the average number of surrogate variables of the respective layers. This is necessary since the actual number of surrogate splits can be lower than the predefined number (when less surrogate splits outperform the majority rule).
Arguments
- trees
List of trees that was generated by
getTreeranger()
and layers, surrogate variables, and adjusted agreement values were added byaddLayer()
andaddSurrogates()
.