sep.plot: Separation Plots

Description Usage Arguments Details

View source: R/sep.plot_Function.R

Description

Create separation plots for train and test datasets.

Usage

1
sep.plot(prob = "Propensity", y = "t_Paid", df_train = ds1, df_test = ds2)

Arguments

prob

The prediction made by the model; should be between 0, 1.

y

The observed data; should be binary.

df_train

Train data.

df_test

Test data.

Details

The separtion plot is a nice way to visualise the performance of a classifier. It first rank orders all observation in terms of propensity, then it plots the propensity line from low (left) to high (right), and finally plots all the "goods" and orange lines "bads" as cream lines. This allows us to see whether our "goods" are plotted in accordance to their predicted propensity, such that if we have more reds on the right hand side, it would mean our model is performing well, and vice versa.

Note that prob and y are assumed to be variables in a dataset, and need to be inputted in quotes, such that y = "target" or prob = "propensity".


Ehsan-F/R-Mixtape documentation built on June 24, 2020, 12:22 a.m.