powered by
This function is deprecated. Please use predict() with type = "terminalNodes" instead. This function calls predict() now.
type = "terminalNodes"
getTerminalNodeIDs(rf, dat)
ranger object.
ranger
New dataset. Terminal node IDs for this dataset are obtained.
Matrix with terminal nodeIDs for all observations in dataset and trees.
# NOT RUN { library(ranger) rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE) getTerminalNodeIDs(rf, iris) # }
Run the code above in your browser using DataLab