Learn R Programming

ranger (version 0.11.2)

getTerminalNodeIDs: Get terminal node IDs (deprecated)

Description

This function is deprecated. Please use predict() with type = "terminalNodes" instead. This function calls predict() now.

Usage

getTerminalNodeIDs(rf, dat)

Arguments

rf

ranger object.

dat

New dataset. Terminal node IDs for this dataset are obtained.

Value

Matrix with terminal nodeIDs for all observations in dataset and trees.

Examples

Run this code
# 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