View source: R/metrics-predictive.R
ks | R Documentation |
More metrics in the Metrics package https://github.com/mfrasco/Metrics
ks(actual, predicted)
actual |
A binary vector |
predicted |
A numeric vector containing scores or probabilities |
The KS statistic
N <- 10000
predicted <- runif(N)
actual <- rbinom(N, size = 1, prob = predicted)
ks(actual, predicted)
predicted[sample(c(TRUE, FALSE), size = N, prob = c(1, 99), replace = TRUE)] <- NA
ks(actual, predicted)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.