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使用交流的微信群,欢迎询问加群。
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.0.64b0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ded92640183391f9928b2f8eac7e7739e857f869b6bf60a3c0ec4f371410bce |
|
MD5 | 1dd6a68365a622d6762f9da14c8763a4 |
|
BLAKE2b-256 | 08ab06e45ddc0ea60c54b70930fefa7e5c1b7bc255c90b0350c6200769a39e5c |
Hashes for toad-0.0.64b0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0005dd106102e7ed2056a5a11b8d6517f113d3eb3ee5e8a463b535c3b007d5f0 |
|
MD5 | 4a91da59a55e3d8fa08b673b25fec680 |
|
BLAKE2b-256 | 0856a251a59d542cfd2338a1b9c0feff9ba293ddc4df03a4ace7a709930c5880 |
Hashes for toad-0.0.64b0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b73dd53a5bf1f3d7ada4ffeda21dfc04abdac802b7fd2db409b4f6b48886fdd |
|
MD5 | 41443eebd9b11baf3af2c4ed0cb21925 |
|
BLAKE2b-256 | 849e1a8cfed72c9621fededd6a3a0f3570bbbb931827cc087a92e2c891a754d3 |
Hashes for toad-0.0.64b0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d5197d10dd50ceb7e1e319d08f7da6183b1a241a7536e70c2ed0d6831e746a6 |
|
MD5 | d9b80583935142c6c37fa88856caadfe |
|
BLAKE2b-256 | 8ab198af0bd8fc027a3fa8f91c00c7626216b3338e29b09d6967aeb394a25db2 |
Hashes for toad-0.0.64b0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 671a71a75a4a40c52858022faca9eb427854c059c16a92bbca9c11bc5e332a99 |
|
MD5 | e812ef78036897c8f70634507ed59e26 |
|
BLAKE2b-256 | 2657ce20dc31689cbd638934b9e167633f54cf2a86d5c08aed6c2cbb213086c1 |
Hashes for toad-0.0.64b0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec0b3e0102a629d05167981c1239cbaebd29ffc9b3cb2f5b4a27b13f694ab91 |
|
MD5 | 72d831633788f5d5dd6ba176d7287109 |
|
BLAKE2b-256 | ccc646543029e6c48ad9ba0589907d7bf1b2321436480a451e56267d355f7abe |
Hashes for toad-0.0.64b0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964a30dfd9fe5bcb77123fa750956bcecdb60f96cad677ad359e8d7a3078c23b |
|
MD5 | 704a4f31e4d03a5dc586beff801726f5 |
|
BLAKE2b-256 | 272cad357dc3e993476323ae61b9bca0bc6aa5dcec763748fcb33870881b3b96 |
Hashes for toad-0.0.64b0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12649162d5f24e8384d08f80f900c558f17d146aedf49a4186b00182dbb82478 |
|
MD5 | 224399eb96d1acc22a891a358281aada |
|
BLAKE2b-256 | 5ecc8c6a7fc8342ea4117d589c10aa254ce517f2820a5a26bc88a134716680ac |
Hashes for toad-0.0.64b0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9bad41f7b9101b357d1f5001c55918117abe89bfc4a64a90b87beed468bf05f |
|
MD5 | c78e714105f6a1a6812237dbdd5636a2 |
|
BLAKE2b-256 | 9e8705017c842603b831f5747907e0e2cce57c7664fc83657365398c4bbc2dd8 |
Hashes for toad-0.0.64b0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39a4d47905f4670eef9e013067f4e851c31073dcf0b2c4caf370f89caf4de145 |
|
MD5 | ca497a0a6b8ae3ec8bcef04608b5515f |
|
BLAKE2b-256 | c76b1eed638d328f83585daf8d3d58a55f6280836717ab0150608dbbdc35b522 |
Hashes for toad-0.0.64b0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d14f596a3fbbcbaaabfb1dd1745a4fc3a96ef73ce3c8565c45e10e9cbbe3a43 |
|
MD5 | 7cf34196a53557fe6c3b89efbab688b4 |
|
BLAKE2b-256 | 6b1b76a59ac8ba6a8378bc60757a70faed26532caee7895fc13ee9ac4a5d83d4 |
Hashes for toad-0.0.64b0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bf29833e1e634df4056b3efa99f237d7154d6de6b08ec429a9bcefd2499441a |
|
MD5 | 6739d979f84398d6c7ebc0c419140148 |
|
BLAKE2b-256 | f7ea7b7a5e42b662e14b62c8455b033e04f39f580f71af714337b98e9f8a2fc6 |
Hashes for toad-0.0.64b0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c61d8657c02c11f5917a2157b8d7cad57dada39185fbf454ebf2a12027a5eb8 |
|
MD5 | 3ee167f2c945206ff27ea4524e6c74cb |
|
BLAKE2b-256 | 041a2f019191429da5d587aab48aa74c4a20e6a30829d13a0944d81a1862cb15 |
Hashes for toad-0.0.64b0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67053032d462986d4f3c9eca8e2072660fa6c7264475f7a9b49763d0f0081bac |
|
MD5 | 9a26482a1ce145dac917f0b0ace4618c |
|
BLAKE2b-256 | 0fc464331c33f1868ecf8b10eb7c89d0e77e0d021b98cb1fe29ee1b187e73ae4 |