distanceTerminalNodes: Calculate terminal node distance for each tree and terminal

Description Usage Arguments Value Examples

View source: R/distance.R

Description

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

Usage

1

Arguments

rfObject

ranger object

Value

a matrix object with pairwise terminal node edge length

Examples

1
2
3
require(ranger)
rf.fit <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
d <- distanceTerminalNodes(rf.fit)

CaseBasedReasoning documentation built on June 12, 2018, 5:18 p.m.