StrCorr: Compute tree strength and correlation

Description Usage Arguments Value Examples

View source: R/StrCorr.R

Description

Computes estimates of tree strength and correlation according to the definitions in Breiman's 2001 Random Forests paper.

Usage

1
StrCorr(Yhats, Y)

Arguments

Yhats

predicted class labels for each tree in a forest.

Y

true class labels.

Value

scor

Examples

1
2
3
4
5
6
7
library(rerf)
trainIdx <- c(1:40, 51:90, 101:140)
X <- as.matrix(iris[, 1:4])
Y <- iris[[5]]
forest <- RerF(X[trainIdx, ], Y[trainIdx], num.cores = 1L)
predictions <- Predict(X[-trainIdx, ], forest, num.cores = 1L, aggregate.output = FALSE)
scor <- StrCorr(predictions, Y[-trainIdx])

rerf documentation built on May 2, 2019, 8:16 a.m.