ezr.gainslift: Gains, Lift, and KS Calculator

Description Usage Arguments Value Examples

Description

Outputs a dataframe that has the cumulative capture rate, gains, and KS metrics at each 1

Usage

1
2
ezr.gainslift(df, binary_target, prediction, higher_morelikely = TRUE,
  round_value = 6, concise_result = TRUE)

Arguments

df

Dataframe of prediction results

binary_target

Should work for either numeric or factor. Must be 0s and 1s though.

prediction

The prediction value. Higher values = higher chance of obtaining a 1

higher_morelikely

Default is TRUE. If a higher prediction value is more likely to be a 1. Set to false if higher is going to be a 0.

round_value

Default is 2. Rounds values to 2 decimal places for a nicer user experience.

concise_result

Default is TRUE. Won't print every record of gainslift table.

Value

Returns a dataframe with various metrics at each progression into the scorecard.

Examples

1
ezr.gainslift(df = dataset_telco_churn_from_kaggle, binary_target = 'Churn', prediction ='TotalCharges',higher_morelikely = FALSE )

jmp1989/easyr documentation built on May 20, 2019, 7:25 a.m.