gain: Calculate Gains

Description Usage Arguments Value Examples

Description

Calculate Gains

Usage

1
gain(target, score, percents = c(0.1, 0.2, 0.3, 0.4, 0.5))

Arguments

target

A numeric binary vector (0, 1)

score

A numeric vector containing scores or probabilities

percents

Values to calculate the gain

Value

The Gini Coefficient

Examples

1
2
3
4
5
6
data(predictions)

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

gain(target, score)

jbkunst/riskr documentation built on May 18, 2019, 7 p.m.