Skip to main content

skorecard

pytest PyPI - Python Version PyPI PyPI - License GitHub contributors PyPI - Downloads Downloads Code style: black pre-commit

skorecard is a scikit-learn compatible python package that helps streamline the development of credit risk acceptance models (scorecards).

Scorecards are ‘traditional’ models used by banks in the credit decision process. Internally, scorecards are Logistic Regression models that make use of features that are binned into different groups. The process of binning is usually done manually by experts, and skorecard provides tools to makes this process easier. skorecard is built on top of scikit-learn as well as other excellent open source projects like optbinning, dash and plotly.

:point_right: Read the blogpost introducing skorecard

Features ⭐

  • Automate bucketing of features inside scikit-learn pipelines.
  • Dash webapp to help manually tweak bucketing of features with business knowledge
  • Extension to sklearn.linear_model.LogisticRegression that is also able to report p-values
  • Plots and reports to speed up analysis and writing technical documentation.

Quick demo

skorecard offers a range of bucketers:

import pandas as pd
from skorecard.bucketers import EqualWidthBucketer

df = pd.DataFrame({'column' : range(100)})

ewb = EqualWidthBucketer(n_bins=5)
ewb.fit_transform(df)

ewb.bucket_table('column')
#>    bucket                       label  Count  Count (%)
#> 0      -1                     Missing    0.0        0.0
#> 1       0                (-inf, 19.8]   20.0       20.0
#> 2       1                (19.8, 39.6]   20.0       20.0
#> 3       2  (39.6, 59.400000000000006]   20.0       20.0
#> 4       3  (59.400000000000006, 79.2]   20.0       20.0
#> 5       4                 (79.2, inf]   20.0       20.0

That also support a dash app to explore and update bucket boundaries:

ewb.fit_interactive(df)
#> Dash app running on http://127.0.0.1:8050/

Installation

pip3 install skorecard

Documentation

See ing-bank.github.io/skorecard/.

Presentations

Title Host Date Speaker(s)
Skorecard: Making logistic regressions great again ING Data Science Meetup 10 June 2021 Daniel Timbrell, Sandro Bjelogrlic, Tim Vink

Metadata

Release files for skorecard 1.6.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skorecard 1.6.9
File Size Uploaded
skorecard-1.6.9.tar.gz 146.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skorecard 1.6.9
File Interpreter ABI Platform
skorecard-1.6.9-py3-none-any.whl Python 3 none any Details

Total release size: 274.8 kB

Release files / skorecard-1.6.9.tar.gz

Download URL skorecard-1.6.9.tar.gz
Size 146.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7633edfa4d0f421a96a719dc6614543bdce0fa58b14d3cb9df24a0c07bdc4f4e
BLAKE2b-256 checksum
How to use checksums
717756e6784e5dedbc883dd5c730c269feae9e2f8a89e94d1fb43bc5e56f4f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release files / skorecard-1.6.9-py3-none-any.whl

Download URL skorecard-1.6.9-py3-none-any.whl
Size 128.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a620d9a707b7a7c7fa8331d168e5bc30acd4b599769b2ecb4b91ee387ffe9a45
BLAKE2b-256 checksum
How to use checksums
8ffdb5c8ddf9cd2f7f3969019ed46d6d6c80f538c68ca2ef74cc38497f036153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release history Release notifications | RSS feed

This release

1.6.9 This release

2 release files

1.6.8

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.7.1

2 release files

0.7

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page