compute.acc

0th

Percentile

Predictive accuracy estimates across trees for logistic regression model

Compute predictive accuracy of response variable with binary outcome. The function takes observed and predicted binary responses as input and computes proportion of observations classified in same group.

Usage
compute.acc(response, predictions, prob_cutoff = 0.5)
Arguments
response

A vector of binary outcome.

predictions

A matrix of predicted probabilities (logit model) for out-of-bag observations for each tree.

prob_cutoff

The threshold for predicting 1's & 0's.

Value

Predictive accuracy estimate ranging between 0 and 1.

Aliases
  • compute.acc
Examples
# NOT RUN {
response <- as.data.frame( c(rep(0, 10000), rep(1, 10000)))
predictions <-
  matrix(nrow = 20000, ncol = 3,
         data = c(rep(.1, 15000), rep(.8, 5000), rep(.1, 15000),
                  rep(.8, 5000), rep(.1, 15000), rep(.8, 5000)))
compute.acc(response, predictions, prob_cutoff = .5)
# }
Documentation reproduced from package mobForest, version 1.3.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.