Skip to main content

Model Analysis and Performance Package

Project description

# Model Performance

# Introduction

This package calculates model performance metrics and confusion metrics at decile level of prediciton. Instead of calculating the model performance at default probability cut-off of 0.5, this function divides prediction in 10 equal buckets and for each bucket provides the model performance.

# Input

The function “conf_matrix” requires an input dataset name, the prediction feature name and the target feature name

# Results

decile_pred - Deciles of predictions. cnt - Count of observations in each decile. max_pred - Maximum probablity in each decile. resp - Actual sum of target in each decile. non_resp - Actual sum of non-target in each decile. cumresp - Actual cumulative sum of target in each decile. cumcnt - Cumulative count of observations in each decile. resp_rate - Target rate of each decile. lift - Lift in target rate of each decile. ex - By targeting top 20% customers we achieve 4x lift than random targeting. tp - True positive at each decile cut-off. fp - False positive at each decile cut-off. tn - True negative at each decile cut-off. fn - False negative at each decile cut-off. precision - Precision at each decile cut-off. recall - Recall at each decile cut-off. fscore - Fscore at each decile cut-off. ks - Maximum separation between target and non-target at each decile.

# Contact Mrinal Shankar (https://github.com/mrinal-shankar)

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

model_performance-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

model_performance-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file model_performance-0.0.2.tar.gz.

File metadata

  • Download URL: model_performance-0.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for model_performance-0.0.2.tar.gz
Algorithm Hash digest
SHA256 65caa6edddea5ecadb35acaab48ef7987d7257e82c4fbfca0e8f9ef05afc9500
MD5 ad5817bbdf8cf9be828f7b6145eb9a4d
BLAKE2b-256 3bd7e1224e8398a0af30f0d0e97ca4fd61bfbd5fdf722502bd99c97ce023b976

See more details on using hashes here.

File details

Details for the file model_performance-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: model_performance-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for model_performance-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69a3d37b15a37e146ba436b02d80ab7dd5670d2b378607b41403060727173256
MD5 803d429c1c39b15c9d840fd8aa181f9b
BLAKE2b-256 8a4e989ee420482b24fa9090fab8a096e920a6a36dc6fa9e207bef73834a0233

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