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.1.1a0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb0be257907c1d503b4074a9023df30d0fdb66d2a65e8917a2f25e579bbbef58 |
|
MD5 | ce7d3683b8d653992df81f6ce780bc53 |
|
BLAKE2b-256 | d93213b45f4eca44fd24b09be0b91953d4286f02fc4153c132a44efacf24cdc9 |
Hashes for toad-0.1.1a0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51643036d84cb01082f456fce7395d48261555ca03ae79cda4b783bbca5af1ec |
|
MD5 | 50fee96121bbb19eff2bea7d495bb1d2 |
|
BLAKE2b-256 | 926cdd52765d4207988c72c2a757b36157f8924fd281d56af176173715dc6c99 |
Hashes for toad-0.1.1a0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83757fbeb1f4804e1a1d835aedca24d490b466f5137dfa45c12331f5794140c9 |
|
MD5 | 78234db27eb65efa97aa0f8645a534d3 |
|
BLAKE2b-256 | 4dc5c6903dd853311a67569b7def1e48e362b2d2f950014f0c9faca024ae8d8b |
Hashes for toad-0.1.1a0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0a31ecbb0a5117b129154d42e3b3b9ce089e657d3fd96c9b28bd8b338452d99 |
|
MD5 | 6e178478ca5e5b73a3da3eb36b77142a |
|
BLAKE2b-256 | cf86cd00c766092b9326f1720734ba1e99315dadd3e14cc2a2193ab0e2a09475 |
Hashes for toad-0.1.1a0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb2879487a348cdd80e8400ba14fbe02b426d3d9d4d7dee3d525801d22cf8ee2 |
|
MD5 | 573b1aad36dd4b940f62773fd7c5e5a3 |
|
BLAKE2b-256 | 6bdee7cd06516d5b507c73a1d8ead16c53a2a1e50e958576d7cabd649dae9bb7 |
Hashes for toad-0.1.1a0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f8f8becdb9eee3358266b33df1de95dc4ea64ad199f6d9ef7d6cc38e13d3be |
|
MD5 | 83b6c777a3b866e623e0f532db80fbcd |
|
BLAKE2b-256 | 4f4807736b42402beaee6719bc09031982f910dc0defde48b17fea93dc217a36 |
Hashes for toad-0.1.1a0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58c9a7e94e314eae0daf545c6e62d5b743947b6702eb7a7f272d35bb2f38f53e |
|
MD5 | 3ed11b147288c581333b0e4e90009b5b |
|
BLAKE2b-256 | 6427664984d41f2369823bc7485928355e0d6a4bd7f4ddd8a6636a625af168a2 |
Hashes for toad-0.1.1a0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9644611a6ea0fe55154c5c33155bc2c0bd7eedb270280b1d0932caef0b7fa67 |
|
MD5 | e250b067a51063ac5ef76be5f48832a9 |
|
BLAKE2b-256 | aab67db2021fa86a83e065bc013d89772268b3459b7b48409e1fb853a27aba74 |
Hashes for toad-0.1.1a0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99862ac6b14ec6bce819a01a3ae9a2b7bc4ff415f1474f4f68a8cb14947e0bf2 |
|
MD5 | d08f2528925b234f6a22f487b22e6ce0 |
|
BLAKE2b-256 | 0bf224ef894249c686d418da25af8758d2559735491de1ad2ce88e4f3fd5c55d |
Hashes for toad-0.1.1a0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ebb366e9ce9028c6f1cd2a6970cfac1a9961e13de2453c63f1ca8987294bf06 |
|
MD5 | 6376b663f58b5f2e0bf1b1256e3c6582 |
|
BLAKE2b-256 | 003077a599ba4fa4e8ba99b19f513d9c19418227d275c5248e668a67a8e8858e |