View source: R/ranger_proximity.R
ranger_proximity | R Documentation |
Calculates OOB proximities from ranger object
ranger_proximity(y, x, sparse = FALSE)
y |
A range object with keep.inbag = TRUE |
x |
Independent data used in model |
sparse |
(FALSE/TRUE) Output a sparse matrix |
An n x n matrix where position i, j gives the proportion of times observation i and j are in the same terminal node across all trees. If sparse = TRUE, object is a sparse matrix dsCMatrix class from the Matrix package
Jeffrey S. Evans <jeffrey_evans<at>tnc.org
library(ranger)
fit <- ranger(Species ~ ., iris, keep.inbag = TRUE)
p <- ranger_proximity(fit, iris[,-5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.