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.64a0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2247dc28293ffafd545280b24b6431c3a139ffcc26178b46108ab0438f6d5afc |
|
MD5 | 7a8426945829eb5496de5b1973e00a83 |
|
BLAKE2b-256 | 56dd9eb8c640c356eab397eee273a4847692443a209ee7eee480198a70d0de77 |
Hashes for toad-0.0.64a0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c6ba0f0a417299d03484214d81a6f83e7900f122f2290e710af90412ae805b3 |
|
MD5 | a4cb6d898dcca1d323280bddab68748d |
|
BLAKE2b-256 | dcecf36a02cba77593bd9f331b2d9872ca6bcee587d2bf1b02fc0350b69803fd |
Hashes for toad-0.0.64a0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c1b5146dc765121ed2ea2e23342b3062c7c55c31ffba77c453521ba45352edd |
|
MD5 | 7a54f8006498530486aca8f8633bce18 |
|
BLAKE2b-256 | d71b6503aeacf093e99e78d357ef5732cf75e6be3c26d2dc8dbb592130b7bd0b |
Hashes for toad-0.0.64a0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0acc5ae75a8867d7a2556341f99a8e5da4d5929de4a06f7ee4418ecd1cc89605 |
|
MD5 | 63036c5709905862e2ba711a70e850ea |
|
BLAKE2b-256 | 424eac498d4d4033754c5cb06131ad5420abedab3e42468b0e4b2fa4bc93dc78 |
Hashes for toad-0.0.64a0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97fdb6b07b26d785972d2b9c1738b6b4ab034b4033f251ac7dcacb33d6aff737 |
|
MD5 | e55f350b78e183fba4f93f92f20ecf71 |
|
BLAKE2b-256 | 92c72bf108af47a7421ed12cc77ee7ee97369c3f9c0600dc6f2e2376a084af67 |
Hashes for toad-0.0.64a0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2b4701d4a16e353665f9d210cbabf1de58cafeeb83035279d790d641d2f00b |
|
MD5 | e54db4dd459c6ed0dfbe7da1944eee30 |
|
BLAKE2b-256 | 28152ee7c327e3b48fa5a3b733b55d828052cf3040933a0955f18b41f1067078 |
Hashes for toad-0.0.64a0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41b8a33a628a4ace1ef9b921b98edc1bbdac0dd7a34f9e8a35489d22300593ec |
|
MD5 | aa257eaf743c7329f97dd781b27c6da3 |
|
BLAKE2b-256 | 399c00fa1624bab91f22684018f9c9b97e05ce413d941c7bfc907f62b2ac1117 |
Hashes for toad-0.0.64a0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba3ff86eebb92a292e034231faaa60608270f79da875f571b59d201137c3e0a |
|
MD5 | ef22d2931af37e637bfb471535cf1208 |
|
BLAKE2b-256 | 9cf7be189eeac1dfe35c80c3a939e2b7a35f8ccc0d146f5e17fed77af233ea8b |
Hashes for toad-0.0.64a0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae2f91763c5dbe8f3e31792029d4447ec2859f5cebdb2cea89ee02bed58e35a4 |
|
MD5 | 5f03cbd6b2e576088bfb42bba9630714 |
|
BLAKE2b-256 | f6eb4f9b91f8f298043fc7a8f9a9ce70cd22ce161e354c5438dd93d62202ac10 |
Hashes for toad-0.0.64a0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b051d4fa0a6cb8bb8a938a8079153cad5a81c7590ade7fd65887972360696b4f |
|
MD5 | dfdd47a88fe49ef44129037ff429c61d |
|
BLAKE2b-256 | 0d1d47e98ce16c2dec1d4e0d1cee204a0c60f87520931a5d8bf08a7d47115a5e |
Hashes for toad-0.0.64a0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f277a56e6111aba6bccf84a44ea415e2d4d42da4f517beca204f57709b1c4858 |
|
MD5 | ffda5ba580004aa0bed388259535ae67 |
|
BLAKE2b-256 | e3f2643480373e6e3ba6f86a52fd363b07ca392ff259b5ef3c6f5d6a7ac0c696 |
Hashes for toad-0.0.64a0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cede2d3bf2402d36ca0c7064a883af1bd8c0244a4153ad2e5d60af02dd0c0f0 |
|
MD5 | c26acfa0764fcb975af2de91ce9e6afd |
|
BLAKE2b-256 | 8919e520f4cb515c8989147e2e3bc17c78a5087db20fb82731f4317e8346571f |
Hashes for toad-0.0.64a0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f7cfcda8f5717773334dfcaeb44ac36747bec27b31957dbfca0c3ff35abcd1b |
|
MD5 | 9058b2f4c36168e249d4c4c0ccc78f7f |
|
BLAKE2b-256 | c4b94c143a11ff28a9c6ee4dfcc1856d59b12249db77ac32c20281304281a0fd |
Hashes for toad-0.0.64a0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e19c62b28c03b58dc7be038d87ee364b4a34b5e413dc99473f267638ed3c37d |
|
MD5 | 4f42c025376a18954e7d5469d0718308 |
|
BLAKE2b-256 | fbc109cea33f5c706f9c15a8bfa4641a41735393964c00e79bf9d1c184aad911 |