powered by
This function returns for each observation the pairwise sum of edges between the corresponding terminal nodes over each tree in the random forest.
depth_distance(x, y = NULL, rfObject)
A data.frame with the same columns as in the training data of the RandomForest model
ranger object
ranger
# \donttest{ require(ranger) rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE) depth_distance(x=iris[, -5], rfObject=rf) # }
Run the code above in your browser using DataLab