monobinpy
The goal of the monobinpy package is to perform monotonic binning of numeric risk factor in credit rating models (PD, LGD, EAD) development. All functions handle both binary and continuous target variable. Missing values and other possible special values are treated separately from so-called complete cases. This is replica of monobin R package.
Installation
To install pypi.org version run the following code:
pip install monobinpy
and to install development (github) version run:
pip install git+https://github.com/andrija-djurovic/monobinpy.git#egg=monobinpy
Example
This is a basic example which shows you how to solve a problem of monotonic binning of numeric risk factors:
import monobinpy as mb
import pandas as pd
import numpy as np
url = "https://raw.githubusercontent.com/andrija-djurovic/monobinpy/main/gcd.csv"
gcd = pd.read_csv(filepath_or_buffer = url)
gcd.head()
res = mb.sts_bin(x = gcd.age.copy(), y = gcd.qual.copy())
res[0]
res[1].value_counts().sort_index()
Besides above example, additional five binning algorithms are available. For details and additional description please check:
help(mb)
Metadata
Release files for monobinpy 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| monobinpy-0.0.1.tar.gz | 12.6 kB | Without provenance | Details for monobinpy-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monobinpy-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for monobinpy-0.0.1-py3-none-any.whl |
Total release size: 32.4 kB
Release files / monobinpy-0.0.1.tar.gz
| Download URL | monobinpy-0.0.1.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d981f6a68c852fb29783ee664145bff840d1ad151315a91435acd8ed8a696297
|
|
BLAKE2b-256 checksum How to use checksums |
e46234f7019752c6738c8ef0df0469c3d2a99c863d6b6f6357a9ed231ebd0fdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / monobinpy-0.0.1-py3-none-any.whl
| Download URL | monobinpy-0.0.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2c0e75a48bfe5c92c6bef7516c47c9bc39e3b53d50dbadbc0c0511dac618318
|
|
BLAKE2b-256 checksum How to use checksums |
c101f2536162e84a311aed4f2ddba658e7e2605e9f24ed0da9912a08fb9b7582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for monobinpy 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.