Skip to main content

churneval is a python package for evaluating churn models

Project description

Package "churneval"

Version: 1.3

Author: Soumi De

Maintained by: Soumi De <soumi.de@res.christuniversity.in>

Description:

churneval is a package to evaluate models used in churn classification. The evaluation metrics include accuracy, sensitivity, specificity, precision, F1-score and top decile lift. The package also contains functions to plot lift curve and gain curve of a model.

License: GPL-3

Date: 12th November, 2021



Function:

get_performance_metrics               Function that returns evaluation metrics


Usage:

from churneval import get_performance_metrics

get_performance_metrics(model_name, true_class, predicted_class, predicted_probs)

Arguments:

  • model_name: Abbreviated name of the churn model (in text)
  • true_class: A dataframe of true class labels with shape (n,1)
  • predicted_class: An array of binary predicted class with shape (n,)
  • predicted_probs: An array of predicted class probabilities with shape (n,)

Returned Values:

A dataframe consisting of elements given below:

  • Model_Name: Abbreviated name of the churn model
  • Accuracy: Accuracy of churn model
  • Confusion Matrix: A 2X2 array representing confusion matrix
  • Precision: Precision value
  • Sensitivity: Sensitivity value
  • Specificity: Specificity value
  • F1-score: F1-score
  • ROC_score: Area under the curve
  • top_dec_lift: Top decile lift value


Function:

top_decile_lift               Function that returns top decile lift of a sample


Usage:

from churneval import top_decile_lift

top_decile_lift(true_class, predicted_probs)

Arguments:

  • true_class: A dataframe of true class labels with shape (n,1)
  • predicted_probs: An array of predicted class probabilities with shape (n,)

Returned Values:

  • A float object with top decile lift value


Function:

lift_curve               Function that plots lift curve of a model


Usage:

from churneval import lift_curve

lift_curve(true_class, predicted_probs)

Arguments:

  • true_class: A dataframe of true class labels with shape (n,1)
  • predicted_probs: An array of predicted class probabilities with shape (n,)

Returned Values:

  • A plot that shows lift curve
    • x-axis: Proportion of data
    • y-axis: Lift of the model


Function:

gain_curve               Function that plots gain curve of a model


Usage:

from churneval import gain_curve

gain_curve(true_class, predicted_probs)

Arguments:

  • true_class: A dataframe of true class labels with shape (n,1)
  • predicted_probs: An array of predicted class probabilities with shape (n,)

Returned Values:

  • A plot that shows lift curve
    • x-axis: Proportion of data
    • y-axis: Gain of the model

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

churneval-1.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

churneval-1.3-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file churneval-1.3.tar.gz.

File metadata

  • Download URL: churneval-1.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for churneval-1.3.tar.gz
Algorithm Hash digest
SHA256 cd5c8b48aa76ade265e3697906c01d6a2968a2043ffc4265ef422479c16269c5
MD5 cc9fb00c616afc1a9da2c1e41f6997d4
BLAKE2b-256 0db73df790382621d9510eb905cb0e6625913e94a027a08a33b9b1cfa7d0c135

See more details on using hashes here.

File details

Details for the file churneval-1.3-py3-none-any.whl.

File metadata

  • Download URL: churneval-1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for churneval-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9aac9569516354fe1c7ec3d8123ace62025c5d4bdd17a0cb67ddaf36e650bc8
MD5 c06d3711253131e83af031de5ce0c117
BLAKE2b-256 d426d6413e02bd42c71ccc04d01b03ea1a5b01a890c46e9bff70490b09b68e22

See more details on using hashes here.

Supported by

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