Learn R Programming

ranger (version 0.16.0)

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)

Value

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

Arguments

rf

ranger object.

dat

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

Examples

Run this code
rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
getTerminalNodeIDs(rf, iris)

Run the code above in your browser using DataLab