CaseBasedReasoning (version 0.1)

distanceTerminalNodes: Calculate terminal node distance for each tree and terminal

Description

first two columns are terminal node IDs; If an ID pair do not appear in a tree -1 is inserted

Usage

distanceTerminalNodes(rfObject)

Arguments

rfObject

ranger object

Value

a matrix object with pairwise terminal node edge length

Examples

Run this code
# NOT RUN {
require(ranger)
rf.fit <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
d <- distanceTerminalNodes(rf.fit)

# }

Run the code above in your browser using DataCamp Workspace