View source: R/metrics-predictive.R
gain | R Documentation |
Gains
gain(actual, predicted, percents = c(0.1, 0.2, 0.3, 0.4, 0.5))
actual |
A binary vector |
predicted |
A numeric vector containing scores or probabilities |
percents |
Values to calculate the gain |
N <- 10000
predicted <- runif(N)
actual <- rbinom(N, size = 1, prob = predicted)
gain(actual, predicted)
gain(actual, predicted, c(0.5, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.