getTerminalNodeIDs: Get terminal node IDs (deprecated)

View source: R/getTerminalNodeIDs.R

getTerminalNodeIDsR Documentation

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

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

ranger documentation built on Nov. 13, 2023, 1:09 a.m.