depth_distance: Depth Distance

View source: R/distance.R

depth_distanceR Documentation

Depth Distance

Description

This function returns for each observation the pairwise sum of edges between the corresponding terminal nodes over each tree in the random forest.

Usage

depth_distance(x, y = NULL, rfObject)

Arguments

x

A data.frame with the same columns as in the training data of the RandomForest model

y

A data.frame with the same columns as in the training data of the RandomForest model

rfObject

ranger object

Examples


require(ranger)
rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
depth_distance(x=iris[, -5], rfObject=rf)



sipemu/case-based-reasoning documentation built on May 5, 2023, 12:59 a.m.