Toad is dedicated to facilitating model development process, especially for a scorecard.
Project description
TOAD
Toad is dedicated to facilitating model development process, especially for a scorecard. It provides intuitive functions of the entire process, from EDA, feature engineering and selection etc. to results validation and scorecard transformation. Its key functionality streamlines the most critical and time-consuming process such as feature selection and fine binning.
Toad 是专为工业界模型开发设计的Python工具包,特别针对评分卡的开发。Toad 的功能覆盖了建模全流程,从 EDA、特征工程、特征筛选 到 模型验证和评分卡转化。Toad 的主要功能极大简化了建模中最重要最费时的流程,即特征筛选和分箱。
Install and Upgrade · 安装与升级
Pip
pip install toad # to install
pip install -U toad # to upgrade
Conda
conda install toad --channel conda-forge # to install
conda install -U toad --channel conda-forge # to upgrade
Source code
python setup.py install
Key features · 主要功能
The following showcases some of the most popular features of toad, for more detailed demonstrations and user guidance, please refer to the tutorials.
以下部分简单介绍了toad最受欢迎的一些功能,具体的使用方法和使用教程,请详见文档部分。
- Simple IV calculation for all features · 一键算IV:
toad.quality(data, 'target', indicators = ['iv'])
- Preliminary selection based on criteria · 根据特定条件的初步变量筛选;
- and stepwise feature selection (with optimised algorithm) · 优化过的逐步回归:
selected_data = toad.selection.select(data,target = 'target', empty = 0.5, iv = 0.02, corr = 0.7, return_drop=True, exclude=['ID','month'])
final_data = toad.selection.stepwise(data_woe,target = 'target', estimator='ols', direction = 'both', criterion = 'aic', exclude = to_drop)
- Reliable fine binning with visualisation · 分箱及可视化:
# Chi-squared fine binning
c = toad.transform.Combiner()
c.fit(data_selected.drop(to_drop, axis=1), y = 'target', method = 'chi', min_samples = 0.05)
print(c.export())
# Visualisation to check binning results
col = 'feature_name'
bin_plot(c.transform(data_selected[[col,'target']], labels=True), x=col, target='target')
- Intuitive model results presentation · 模型结果展示:
toad.metrics.KS_bucket(pred_proba, final_data['target'], bucket=10, method = 'quantile')
- One-click scorecard transformation · 评分卡转化:
card = toad.ScoreCard(
combiner = c,
transer = transer,
class_weight = 'balanced',
C=0.1,
base_score = 600,
base_odds = 35 ,
pdo = 60,
rate = 2
)
card.fit(final_data[col], final_data['target'])
print(card.export())
Documents · 文档
Community · 社区
We welcome public feedback and new PRs. We hold a WeChat group for questions and suggestions.
欢迎各位提PR,同时我们有toad使用交流的微信群,欢迎询问加群。
Contributors
Dedicated by The ESC Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file toad-0.1.4.tar.gz
.
File metadata
- Download URL: toad-0.1.4.tar.gz
- Upload date:
- Size: 14.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8825cd141a48a0f742b7692e630cd5a6949cec8cb7bfef4fc9ff959e2401870 |
|
MD5 | a1e6145e644c9587dde8973d055d5481 |
|
BLAKE2b-256 | 12b42b8bffe01244e6d843d4b5fac8eae159dedf7c3c7eaefa82443b17cdbc1f |
File details
Details for the file toad-0.1.4-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: toad-0.1.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 14.2 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0724d2f685fd8e4b3ef1fc357802c38be786c96d9940ba2abfaa7609a7537465 |
|
MD5 | 16e94056900611a09890f39979c8a683 |
|
BLAKE2b-256 | 049d017324b66bbb3e01ea3a3629a1004b6221ec0a4920942d6aeea1cb38bbbd |
File details
Details for the file toad-0.1.4-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: toad-0.1.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 14.2 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f25d76f73975c01b926e9bc7aaa1e199e7e8877b533880981a1419d347b39550 |
|
MD5 | 4d1316b3d3f446a841e3d0e4673ae508 |
|
BLAKE2b-256 | 92a778e195779e2f1feeca1d522a0d509c439d5a3e84141a9c506531733c8904 |
File details
Details for the file toad-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: toad-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 15.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f478ca60c3bb8810408050cd7f09b69739e598da5e6b7d7a4766fea9212e98e |
|
MD5 | b205cadf5ec992a52880ad06d37be342 |
|
BLAKE2b-256 | d25ad2abb287fd1aa2719bb1cfc0ce14e5e9feee6f3c48270a888b55ad6e72c1 |
File details
Details for the file toad-0.1.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: toad-0.1.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 14.2 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31df5dad9d0b31198e136f62309f4fa9113328b48653dc22981b7be058d0414c |
|
MD5 | 4981fb7d281ae3e9f4cd204256c79d19 |
|
BLAKE2b-256 | db11edb32cbce6a867cff88cdf083c26dd38e69ac2295ad1a1e56e6c1e578708 |
File details
Details for the file toad-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: toad-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 15.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebe24e7e5c2de3def266d595a42ef0f222f489d0f280962b54a70e85829615e6 |
|
MD5 | 0783ef6122428ccf01ffc5418cbff055 |
|
BLAKE2b-256 | 4d2414d05aad47a3523170bce603ce5f703028808f580552bd64f2a4e5ef7f22 |
File details
Details for the file toad-0.1.4-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: toad-0.1.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 14.3 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eca1f0e6ded3096503e18edd9547dbf7ef97e530b902c7752d1712cc47a04db |
|
MD5 | 56689b8a3cceb43bcf47e6b54a923f3e |
|
BLAKE2b-256 | ed5712a19e59117804e43a27ac6d82f3393666dc1a27e5a9d47f2c71988c7e2f |
File details
Details for the file toad-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: toad-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 15.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a8dbdc5113c61ddf81de56e935270f18ef86d2da33d290ea79231e31aee328 |
|
MD5 | a4d1dd4738c0e91fe2062a7364729667 |
|
BLAKE2b-256 | 3f9716b523660c17adbe926f44e7029716e0f2d9ce30adbf20564a80624f25fd |
File details
Details for the file toad-0.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: toad-0.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 15.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a4130832214d5b3b1d0d1ea05680b7552f48a8f53d2589a7b997442aff9aaa |
|
MD5 | c7bbfc0f086f89569cf63c10609f0c44 |
|
BLAKE2b-256 | 97c4421bf4287f306dce55caf175603771ebf71978713853e789546875f78e39 |
File details
Details for the file toad-0.1.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: toad-0.1.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0ec84a1f5ad6d039f0eda42868d7902198d897b06759f1bcf553506f62fca3 |
|
MD5 | 48e0a05ff863de3b1f42fa814d31bb2c |
|
BLAKE2b-256 | a08329b90dc2de454305c588136a1d190608c9310652ade4e63d945fd632f845 |