Separation plots for binary classification problems
Project description
sepplotlib
Separation plots for binary classification problems.
Credits
The one-dimensional separation plot is adapted from code originally produced by Brian Greenhill, Michael D. Ward, and Audrey Sacks. The bi-separation plot and model criticism plot are adapted from code originally produced by Michael Colaresi and Zuhaib Mahmood.
Installation
pip install sepplotlib
to install.
Example usage
Please see the accompanied notebook for an example using mock data.
The included figures are objects that expect a pandas DataFrame and strings for the relevant columns. To generate a one-dimensional separation plot for instance, simply run:
import sepplotlib as spl
spl.SeparationPlot(
df=df,
y_true="y_true",
y_pred="y_pred",
title="Example"
)
Similarly to generate a model criticism plot:
import sepplotlib as spl
spl.ModelCriticismPlot(
df=df,
y_true="y_true",
y_pred="y_pred",
lab="lab",
title="Example"
)
And finally, to generate a two-dimensional, bi-separation plot:
import sepplotlib as spl
spl.BiseparationPlot(
df=df,
x="y_pred_a",
y="y_pred_b",
obs="y_true",
lab="lab",
title="Example",
)
Please run help
on any of these classes to learn what can be customized (e.g. help(spl.SeparationPlot))
).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sepplotlib-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56af229d203491561982a6000ffbe2044e18f5a86e357c9a419fe959253ce15f |
|
MD5 | 45c46b9711a69fcc7eef49bbd5d3024e |
|
BLAKE2b-256 | 1eca0747ed42588293795273063677372877c3c8c8f26007ad3eb9ad27fddc21 |