Skip to main content

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

sepplotlib-1.0.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sepplotlib-1.0.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file sepplotlib-1.0.1.tar.gz.

File metadata

  • Download URL: sepplotlib-1.0.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for sepplotlib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cfd45c89faac5428e81f91ccc86d0e8a2037bacd936f0e5a51ec0df3b94339e0
MD5 821621b2ff1ee333d383f8420bf6a7a8
BLAKE2b-256 122898e9dc9ef18cab9ab5818d2052e24c927480f41067dd8e53323ccca0a2b4

See more details on using hashes here.

File details

Details for the file sepplotlib-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sepplotlib-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for sepplotlib-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb635f577f3b513363ff56c7b76a134cef826fe44ed83c81bcd4170aebcb794
MD5 4790779faf7e77810251b9caf710103b
BLAKE2b-256 47cf25e8bab2862640cfbbf2bab2166ed174523362820dd57468865e6f177439

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page