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.64-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0332047c0341544a28520812bd5e2a50a74feacccd05c7499bcdab1976794f |
|
MD5 | ba9404144a6f4080fc96657f6c25990a |
|
BLAKE2b-256 | e0c8b3a24b8c89ababb0ad8be60d6d308e7c7ee8420096fca99c76d47f405f88 |
Hashes for toad-0.0.64-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a36b4e0b2967a5ccfa58b11955bb86456616b2a8178358ab5f00697d21247d02 |
|
MD5 | 90986c1f2d593c1a14b5881acd1fc448 |
|
BLAKE2b-256 | 4bf6d2e210bdadc28912cee630e8aab6258db7c36d81797163a2a89839fe1372 |
Hashes for toad-0.0.64-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6483669f271092dabc44a1eaa765906f3dfd05199f937e2a9f64f02c932828df |
|
MD5 | 330eefce49b88c5d0f6284c544381927 |
|
BLAKE2b-256 | fc24bc69dc899e10400068dd4544d537a94bacf6df5ecbf70c73ab799bda90dc |
Hashes for toad-0.0.64-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f601ef5c5bebb461e60cb98346ec7fb2679c5da3dcee147e269bc94645b150c9 |
|
MD5 | 79b5d697ef264a862ecd5c3cb4b28167 |
|
BLAKE2b-256 | 794f3b0a4081070524c48406e630ece39f84db53452618767ad5627ab2b1e6ab |
Hashes for toad-0.0.64-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68411dbc68b6dab45853e4fe2dfe048da6d6522c4cac2dc64921c6496497cf18 |
|
MD5 | 8103a618974a2b6c84e3685a2fa31660 |
|
BLAKE2b-256 | 65a74c15950fc424b21ca6469b0c21e61f4d1cf128e9c97e0c02ad837c38b431 |
Hashes for toad-0.0.64-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 035475878ac4bd4fcc725d43909f7a9023db4e356ee4c2f47fa87bd1cb842079 |
|
MD5 | 1bb2aa26083a6e4b5b2dcaa61177d257 |
|
BLAKE2b-256 | c93703c033d43aeb0d9067ee11dfe672b2f229be75f820641e63d2252f6162f5 |
Hashes for toad-0.0.64-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb9736577d0b7177daa8c074185bbff7a59edf70bbe3ba882d601161d55fe79 |
|
MD5 | a42f61c6c188aef4d722d0d70635c166 |
|
BLAKE2b-256 | 6d3b31595892d834f2dc7bcb5c981984fe7f97dda9a6b1a0a831084ef3b2fa19 |
Hashes for toad-0.0.64-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 404be9ca93a32c7c3511c98c38c6bbcd5904affbf2cbd3fb8b06cc84a4c86f8d |
|
MD5 | c9bb562d21222db869dbc3961e3e90b5 |
|
BLAKE2b-256 | 8eaddf2dde48b06d0d6fc70eaa3a8a21a1a509d574c30f2f91c05ec25bf272d9 |
Hashes for toad-0.0.64-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f487ab9be305a341c85df6dff83ec8f82c4dc2cf53b5d9577608a02caf308849 |
|
MD5 | 929a8f8e19f89283cb293b66492c7ebe |
|
BLAKE2b-256 | 0c2fddc3e301e24d63518aafdb26b490645a61f455e0773a35ca7787ae7a0e96 |
Hashes for toad-0.0.64-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4271e8217e3c0c7ab2cfb9591ac07e634cc953caead19fb85a8a1180bc54b485 |
|
MD5 | 7a0684dbce323aa2804ac24e0439cbd8 |
|
BLAKE2b-256 | 7e9e15f47fee828452478b01f0f6f01486951a5b0a7eb2ad1a1cb231ec0d0236 |
Hashes for toad-0.0.64-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d9a83957ba5f008d5f1c68f03c3682f3f39e590346d5fc9a1d4d0721c56ac78 |
|
MD5 | e85e032fd1b5f838d811d796fa1238ea |
|
BLAKE2b-256 | 2b41d178d845aa182bc272ed890273f76ddbbb364d06cb99d3a7c7f141e33136 |
Hashes for toad-0.0.64-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 795398c58bdc3071a388e5cfec885a0cad29d2af0b38ac54d2ad17aa0279e875 |
|
MD5 | 23a990b668ae68147f7b9e4ad70c68f2 |
|
BLAKE2b-256 | 1c9fdbd513cb0e2b08a89daa7ba3b4447933cb38337860b2956f49f84c19af15 |
Hashes for toad-0.0.64-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcecf7570966fe9633f1ff4b79cd085aa73d6626480fb4acc74c0f0ab69ca0d6 |
|
MD5 | ad715de9989563e26fd1784fc7bc9f97 |
|
BLAKE2b-256 | d5773cbbf18e98008abac95555f8289d52811fa02c6e11d9ab1fc098e50596cb |
Hashes for toad-0.0.64-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce08200787945e6ecba6c47601667d5697db8519aea9362b93570b1509c75cd1 |
|
MD5 | 2a8fef50a1bf72a3c7d14096effce505 |
|
BLAKE2b-256 | c6ce29cab5d51ac40cb93edfd0e5b1b9657da783b59f5f9532053c7dc239529a |