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.64a2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c71b5245d49206cf870ed672e888c9905fa0d9f9703bd553621b0952c225c8 |
|
MD5 | 08516d83c0eca49b510437a73e415ffb |
|
BLAKE2b-256 | 0c1c0387c11adf95b39c26ae5fbfe185e21cb668e00685f447a74334ff48cf60 |
Hashes for toad-0.0.64a2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 743dd8d6286f406fe60c4411704b358fe8f863ff28d8da7e4789905fcd037091 |
|
MD5 | efa85c16653ef26c7726504035bd91e7 |
|
BLAKE2b-256 | 34f0ac5a5404a1e7a8c0f1b88fadc35c5f97b2849230196ee89e20a5279298f2 |
Hashes for toad-0.0.64a2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98e40b58f6395042f410b3f32041ef510792131a1b9d62db30d0a2c029d54a9 |
|
MD5 | aa4355cf36ef99a1e03e50b6ca42bda4 |
|
BLAKE2b-256 | a4c3736399b0cc9bbca3564a8c1eef0ff4aa37f69d1f0a81e757b2ee88be8a6c |
Hashes for toad-0.0.64a2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13c419b4f21a15d2ea3ae91fc655fbdba5018f8b765d4a3fad8d10134c8fff2c |
|
MD5 | 4893f974d9127a625867aace87177baf |
|
BLAKE2b-256 | 8df8670ab2ac6179e935ddb5afc3a5746a472af0c766cf1a53bdb4254b0b3133 |
Hashes for toad-0.0.64a2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f72f84745f7d007871d3d52fbbe3f4927131afaf5a2cb0831226f575206a80 |
|
MD5 | 5d0ee338b5de25de1288ef550b43e5eb |
|
BLAKE2b-256 | d1de52bb92320bf2e8540c69b1b4949caf15a67792df441e6174297fb70e6c51 |
Hashes for toad-0.0.64a2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 189747e388047a74ce382ce511c0d42298b401692d96efa9593996e05bfd0418 |
|
MD5 | 6489c1c2f8e2f71ec20d7ba8465db9bf |
|
BLAKE2b-256 | a4bea2eb2e788b0cef1e184a397ce087baaa5fe03762cfb3a937459500dc2d59 |
Hashes for toad-0.0.64a2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 263dea10df3191f526bea59835f5acb43b305231777e58a7f9f3ee3baf157b26 |
|
MD5 | cb23e408a7d4bb9174816ac0112e6eed |
|
BLAKE2b-256 | f43d893c25b7546227ae98b99c0ed3e74f70d0046dd420929ececb0e5bbd3efd |
Hashes for toad-0.0.64a2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 513b7eb97c042bd1c875b8d9dd36cf0ddf2124bbaa512821b65472ed2a01dec8 |
|
MD5 | 2165c28a8dd077728d4f6aeef08420e9 |
|
BLAKE2b-256 | 4c9ab5fa111ec3f3840d164deeaf16119a2de70cfd18522bef221c5b0e9df6ac |
Hashes for toad-0.0.64a2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf1d205bb82265fc89ae35fba090e87f04239520a46ebadcb20b333bfdb2036 |
|
MD5 | 6c71feae186f8cd204cf117275ae16e6 |
|
BLAKE2b-256 | 11bbf06d2f9cd380fe1859d0f86b4746ff1a823f7f3195cb256e3ecd47222cd4 |
Hashes for toad-0.0.64a2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a5f315f8d15d1d3a05be3b2df880fc9c363646ccce50d7e9cba471b49bd904d |
|
MD5 | ca0315ab25fad54296b1734d6a4986f2 |
|
BLAKE2b-256 | 299d9f4b5613738c8dafe569877f0bcd5f92800d5083aaa6c81c6bbf7e7dc7d2 |
Hashes for toad-0.0.64a2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cde45df3a91d2ada17c884bef872c2f9973076f9f293d0e8e7a0683a316973c1 |
|
MD5 | f689afd8473c0e4f910186be90374d12 |
|
BLAKE2b-256 | 296c1798da6b13f0ca43832563d6c1f1cffe600b8dc53daf21875a5208bea991 |
Hashes for toad-0.0.64a2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8848c58bc5f8f33fad860eac3633b55de99e9ced7202df3f8710da8e33296d0 |
|
MD5 | 4fb19b076302a706aedf74f7e234e2a1 |
|
BLAKE2b-256 | c2d52ee13cceceb67fec816dd27859b255433d616d6cdc7a7daa0a607d244d77 |
Hashes for toad-0.0.64a2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd766d4c2ddc5fa23c3e6d20c2212b4688b361a9a28830af4391e9d6011c6824 |
|
MD5 | a3d9ca8bdb269d84bd4aca341c9304bf |
|
BLAKE2b-256 | bf2108d7c1d13944b3dc9debe26d3203c3eaf51996373ace8db9553cec77f6cd |
Hashes for toad-0.0.64a2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c6a20ea89533e3345e9cca94c798f31f2ea969dd99120c68b58f2ffff8ed0b6 |
|
MD5 | 7037fb6d0a12a00a5f4a29326053c805 |
|
BLAKE2b-256 | d101905de641efcafcafa324f714fa120809c2e8fefd69e85d220a0d8c24ad12 |