ks2: Calculate Kolmogorov-Smirnov statistic

Description Usage Arguments Value Examples

View source: R/performance.R

Description

Calculate Kolmogorov-Smirnov statistic

Usage

1
ks2(score1, score2)

Arguments

score1

A numeric vector containing scores or probabilities

score2

A numeric vector containing scores or probabilities

Value

The KS statistic

Examples

1
2
3
4
5
6
7
8
9
data(predictions)

score <- predictions$score
target <- predictions$target

score1 <- score[target == 1]
score1 <- score[target != 1]

ks2(target, score)

jbkunst/riskr documentation built on June 5, 2017, 5:13 p.m.