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使用交流的微信群,欢迎询问加群。
Contributors
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.2rc0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37c56de4ea2db688b45e443b7a61af284263caff3f7c3182d6daf6e152f9a0b1 |
|
MD5 | e41625fd1e864c0000c542e8b82ffffe |
|
BLAKE2b-256 | 6aceefeafe3b6cb1cee95c6fd655711b36c595f887a196bd0f4c0aba4c81ac87 |
Hashes for toad-0.1.2rc0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9410fa832acac2cc3b35ac6b5963016c00c4cc85163aaec314cf7a878f6f771b |
|
MD5 | 5c703c62c89bfe1a062e73105ae74bf8 |
|
BLAKE2b-256 | 943595aab387ae158ddc986b9225af863c319b5087ba4c3430b1b68c3c1be407 |
Hashes for toad-0.1.2rc0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65b48143d2604092d6ca3e8d8f50d62d5fa8ed4be7dacc49dca379a925ca298 |
|
MD5 | 677670d6923f5a793afe426378671b63 |
|
BLAKE2b-256 | 2f0cd2cb0df6163b50885da1861d3cea7d73713adbaffb8f2b65e2bc03fa21f1 |
Hashes for toad-0.1.2rc0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8e03d5b572ccce565b8ba68b46feb90fd6d3f22ddbe66847026f1679c6a7e84 |
|
MD5 | 19ae95e2921a347bb33f008c24632e90 |
|
BLAKE2b-256 | 61a8d6e5f98b104c43b9ffe190434f9fc3136001d5f7f8d4edb05a4cf94c1984 |
Hashes for toad-0.1.2rc0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1a25254f8c40f2fcb668086d2d56d819ca0d901ce362af46c062e040d750cc |
|
MD5 | 69ee449708da2a32fe663c4edcc0b593 |
|
BLAKE2b-256 | 88b0fc9f42232e05e241ea92e7c3477e070bb67dac9ae0647dca8bb847614bd4 |
Hashes for toad-0.1.2rc0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6118f5a2c4f7bbc9bd3781f9b7c94c752655b3f52152c8bb5cca12f87c47bff |
|
MD5 | 506c4b63899fb9249d22b8ba7a6abb4a |
|
BLAKE2b-256 | e7cb8a76042731c73bf8cbab131c615da2d3dfe04df3ed3d22ac9c207035b598 |
Hashes for toad-0.1.2rc0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5309126e89123fb2a0ae968fa7631a3bdcd429c44609525dd3f7487d06460e8 |
|
MD5 | 81d9dba14b2aeca261cc6cfc080c2cb0 |
|
BLAKE2b-256 | d147811a8be4cb882bbfe0d541674f51b6b0736d36c62d7af69c460c70175a24 |
Hashes for toad-0.1.2rc0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0de0d73f5fc3754840facf013e3c54bb152bc7cff660b88c7f7bc12e59c0f60 |
|
MD5 | c1d343e640d025586137a8368873d5f8 |
|
BLAKE2b-256 | 35e416b6b78ff8a9a8085748f87694afad7d532e390b7c4f4796356f0d2f1310 |
Hashes for toad-0.1.2rc0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f722d012cf09f11f0cd3834aa4fc4a5d5ce5955ad161e9c2f04dba73406475 |
|
MD5 | 23c915009f3d525c2d6dea9dd633efe6 |
|
BLAKE2b-256 | 4ea29a5b13d193b19fdad24beadef4076014bb229dfdc9f95bf1828034747914 |
Hashes for toad-0.1.2rc0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f308bca1868a69cb90fc8c4267860adc9f1968978f4d81d4d2e8bfcd25f25d |
|
MD5 | 6b64bd44aea06e3672eb2ddfda615515 |
|
BLAKE2b-256 | b300b017b3ea0b0cd811cb7cd7774ea50892519804f0e23405583006acd47e16 |
Hashes for toad-0.1.2rc0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db927b1cf685b85b143f89184acf6fb09cc653649d40aea2adb23b6da65d8b9e |
|
MD5 | 6c577638e7ec1acd9363e7b44e1fac37 |
|
BLAKE2b-256 | 43c9cd6e4886f83b224fa3e0162ad35baf4142381199e57fe196c9275bd7e284 |
Hashes for toad-0.1.2rc0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 648049c2128e8261a97f8793d2fccb7f80eca8fd2d842729d30d8557c7278647 |
|
MD5 | dda8ae705ec1dd734b63f165afd02907 |
|
BLAKE2b-256 | 95b0f600be35480a477384b2f9c9e74d8e2f2145ec545a108b0c1c28ccf541d2 |
Hashes for toad-0.1.2rc0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df19bc1702a37283eef72c467da0fa712281e9b850ae847d3d6c674d604694c7 |
|
MD5 | 1ae2545807c5addcfdde086be0ea5c86 |
|
BLAKE2b-256 | a60cb4c4e4ce16193b758b67a9a5a12f0e7f210abfa4006ed4805026ba8d4dfe |
Hashes for toad-0.1.2rc0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 555b3f9023e5c051709d0c9629a5c85cc8d744c5f6f32e2cc4194052e1a6908d |
|
MD5 | 4940239eeba3ac75eacdf6401e0c4637 |
|
BLAKE2b-256 | 69e28a3ab940f29ee3ba9de412117fd91ed03b08b30d29a7697f7e00a3411faa |
Hashes for toad-0.1.2rc0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb209afefb6e39fcd6a73f40d01d08fe808d9ff4751fbd6a664c5b7bdac7eac7 |
|
MD5 | 342b86d7eb1cda8d786b6b7e1b5dcab1 |
|
BLAKE2b-256 | ff8d3686404b19891be646f390452fc1b1733e02841e614c1e7a9e8fba8c96f9 |