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.64a3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4076217c90d3cf2e1244be9bee4a5499cd3de7102de25c7f10855551584f6f7 |
|
MD5 | f4d2355473652b5df1dab57745653581 |
|
BLAKE2b-256 | eafcb35d378c1526a2f361684d1e12656ee773dd6c7a46ef2375c24763e7c905 |
Hashes for toad-0.0.64a3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7469eaeed82f1471702043856fd32e24a7d4a25f0cca529077d9e5441c331fb |
|
MD5 | 74653f8bb728add3ac7268356272439a |
|
BLAKE2b-256 | 7e22f1984208c47a6f29538327de6948cd6df4809c9c68594019fdd595c89dfd |
Hashes for toad-0.0.64a3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7983282783df78fcf7ca8cf4b03c183a8171134b2a92d6e2782c04ce724d956d |
|
MD5 | 89a6d5be9e29bce219cccd854921b2b1 |
|
BLAKE2b-256 | 7ff9753afc12c56b4cbd7db98586cbb788b43bcb2fd9fc37ec7f759aa41d7de8 |
Hashes for toad-0.0.64a3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3344d160ad57988b1d2828822786f7e01431806eb486af75f45d757e35cf47d9 |
|
MD5 | 5db32a1075a79c1676d4e2670872195c |
|
BLAKE2b-256 | 623af6103911502bf5b55248d44e801261a25fba5b451ef38bd8c187bcf80dd7 |
Hashes for toad-0.0.64a3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c248dae3e33d740818e2004bce273f74059cc59c83eb9b368d8971b1394524a0 |
|
MD5 | 70730e7d9825984361e6e234dee84a8a |
|
BLAKE2b-256 | 83d752dac698a6f36329584fd083114278f52091e34117077b35ca79ab1dc844 |
Hashes for toad-0.0.64a3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9ac4e8ef1fdf05426bf1e68648c4ad95031807928b11be2c09ad92408e72a18 |
|
MD5 | c2336739ef1850fa83eed7a5e845f51d |
|
BLAKE2b-256 | 86a171c59718161f4843844a47d5eadf38b7d99f6e72ab7f608c32c5432eb3eb |
Hashes for toad-0.0.64a3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af38004c14adc866af008eed1632aba5fd587e20524adf897e59d457a22dba3c |
|
MD5 | b3c401eac30366fa59cd6b58370d0e78 |
|
BLAKE2b-256 | c3c28502782daecedf5f2d49660e276c1b00b8cbe01a0a384e4bb6f67228f53b |
Hashes for toad-0.0.64a3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b91374a7d75ef7b4d0ad983cea60f18097c187d85741bee41be2d0ddcd8e38e9 |
|
MD5 | bdb02582b4b66d4bae627133edd66d43 |
|
BLAKE2b-256 | 1ce3c37f45c245e3459832a1ca1c6da435c84403525d2b2e1759495b9de26c3e |
Hashes for toad-0.0.64a3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4137b2ef0b5d6d13de415101ac8667d1416dd64f763495b27fec4907e9435953 |
|
MD5 | 3073ccf0ad303574ae0cc2a9852f5264 |
|
BLAKE2b-256 | 156294c286afecdb3ed044e55d21b08d1233149017b98de9552364985c79801c |
Hashes for toad-0.0.64a3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4593ded3b5971eb311225307174b005043a46fae666d2f98af87fd4bf3e7635e |
|
MD5 | e8b88d363f2a97fbe3288197284676c1 |
|
BLAKE2b-256 | 32306edd2e084bde8e88e08cfa1b5dff6dc39ae161d012b037d512461a612c54 |
Hashes for toad-0.0.64a3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 692d7861ef246b3ff5bee5f96e1bba42bfe06a0e594ce23174c18c472d8f0878 |
|
MD5 | c7071b7b1b03788349e438a473ff9143 |
|
BLAKE2b-256 | b10a3b430683fb8bde78efca9f54db650fcd1bc51b39f231660d73797aab454c |
Hashes for toad-0.0.64a3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60de07c25cb0971c97019bc0378a0b8100c1b8253940146e507510bbd50be790 |
|
MD5 | 5051860dcb2162ea48405686b4c250e9 |
|
BLAKE2b-256 | 311d73f783a4c02f62d7c53775c312b5a6381e3c893271b8979c5c76271ba892 |
Hashes for toad-0.0.64a3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15b282e6d82441278c282fb6f41c0465089c0abe4fbe9e26fb5d87743fccf120 |
|
MD5 | 6645680f805fd4ae596bd421a39607ea |
|
BLAKE2b-256 | 096fb306642b272e16e7346068cfe01eb880381f16308e7f4de36afd8f1271ed |
Hashes for toad-0.0.64a3-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab91131c048319b31b9fd92bccd569a484c2bff46591572371a588cc54fe8cb |
|
MD5 | a448be1bdd0f436c7bcfb72acb741e1b |
|
BLAKE2b-256 | 7185c9c8124814a086420305f1ac48ae6b9ae9cddc1a8172e0e5fab0c7939228 |