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',iv_only=True)
- 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
Hashes for toad-0.1.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8070e8fcaf22919c38225e95520bcdc2c6930f8852049c266633b2b48b62de77 |
|
MD5 | 141cf5b90c0f2ebd3bfa101170a5b8a5 |
|
BLAKE2b-256 | 85e8abf1b21190049e6a4c44f582bf1f97dfcc8f1eb2376f239174a8da66b663 |
Hashes for toad-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68982ce67ce54034a7fe6fd4194d847966e9fd2c263dc402b4c43d024953720e |
|
MD5 | 3b39b76e0ff77416a2da0fc070f1d782 |
|
BLAKE2b-256 | 6957db3e312c9be51edd7ac1090abea6f3ffa292dab45ba07df2f4471800088f |
Hashes for toad-0.1.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a90ec6b3ed583b5fc3bc49ce64c2b7cae6097df819e82853972fa2a62aa540 |
|
MD5 | ecf717408bab7ceba46bdd5a9d8b0b36 |
|
BLAKE2b-256 | fd14073f287de58e79c52643dbc449970bb494434fd8846cf0eac46e361823d0 |
Hashes for toad-0.1.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ca25482225adcb266dba12dc0b7eafbf6b51ff2d0fb18c281fb30456bd261cb |
|
MD5 | e9e251c2990e540a9f219225d25dd0ea |
|
BLAKE2b-256 | d6404412a9d9d6ba26f97e3e70e6766864f61fd06d94076728f2fe71a4f6f86e |
Hashes for toad-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c09106d24f1b903d09ea1280a0d5f03854da863c4fd05784545d4a55fd8b98b |
|
MD5 | e5c7df47b1e7d578dad46eb8cbaaa149 |
|
BLAKE2b-256 | 11057e38208250484cade101543dbebf8d77a0919907916381be2fd35a083ad1 |
Hashes for toad-0.1.3-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adaa28c11b8471b0fe0a9a18deeb43be85b7490168f0b19450124f93e57c9b33 |
|
MD5 | 7fc0d8d83e77b3e2d84ff672ca1178f3 |
|
BLAKE2b-256 | aa0cf7552126b9f6e3f22a32ef80327770c39ab229b78debf957797752d71460 |
Hashes for toad-0.1.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f20ca8dcdcff9fd52da7c31ba80845196a40f35f701eeadbaba1bb4e0f5edde0 |
|
MD5 | 89b46d0be91353a8d1d63f92e802b09b |
|
BLAKE2b-256 | 62134cba92bd8f4e5af962dada7af565e46338614ecabe42ea660d1706de582e |
Hashes for toad-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2661457738815219c04de7f7b11ef0ff8a609a10978f0b5e73526b103d4e9f20 |
|
MD5 | dd27f8b9bac51450934f237c7d8a2f7d |
|
BLAKE2b-256 | ab2b52615f0111dc650c626e031ae24933da9873850886326e38b31444667bab |
Hashes for toad-0.1.3-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cb0c22cac2edb9f20d035fa9b96c48d537cf9fab393ce2d87eb881c10806f9b |
|
MD5 | b413dd072f802bf09af1e34aba846836 |
|
BLAKE2b-256 | 2a1ec2a46acb887f7d65d315efb99fee2c41e4678b3bc741ff554c6b42bb1d8c |
Hashes for toad-0.1.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0b155ca37c5eb10ef346ba64e7a56450028f111ca034eb20cd5de0395d06a2 |
|
MD5 | 06e1d8503b7143c5f4361d4a170b0f5f |
|
BLAKE2b-256 | 8d5dc5d72dff2650ed327dfccb34f4873e14a150291a300ca41fe22a44de8257 |
Hashes for toad-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e7490b7f5b77829d1d681cbef868fba161c935d0fb3817fedbcb825284dfaa9 |
|
MD5 | 39161899cecccae1ce5f27ca5482c2fd |
|
BLAKE2b-256 | 5c63a4cc58fa62be36128583e0b1369f47878fac768e4d5a0f67961dcf9d0106 |
Hashes for toad-0.1.3-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5209879fc350d3479a08fb7e550ca2b24ec9797b58e8ffcd10c9cdc2399a1778 |
|
MD5 | 9aae6cd9ef7a0e90efd4bea222aa8932 |
|
BLAKE2b-256 | 497767beccbe29b5ee3afc9f86edf62d3be2fbb5291d4b06f0e96c6049207064 |
Hashes for toad-0.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e46f7355fcca7b565488c09782fae3107d22013ef0608582adceb92085350bb6 |
|
MD5 | f77eb012f59eeac379ebec3f956cab4a |
|
BLAKE2b-256 | 3b7145c96ab06c3829f2dbd01795260474d9dfef0624c8fac51ed70e33bf0962 |
Hashes for toad-0.1.3-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba1d34f64d970bf0d907b1c82d0d3e0821625884df391c2ad1c7ab5b2ff69f66 |
|
MD5 | 72763991d52292382567ba89363e03c3 |
|
BLAKE2b-256 | 742a30da744e593798b9cc46e1eaa7f18809bd7e7e905cfeb9135fdb63bcfa1b |