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.64a4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee2c53da34ce598f54e8d7aa25f1d58de18a9254163f7f0b419b8183bb83ae26 |
|
MD5 | 50bee26b9724719dfc9511501864c096 |
|
BLAKE2b-256 | 2a5b349b4fe01f01d694e40459caa52ebdbc89e32efc086d253e2c37f51477f2 |
Hashes for toad-0.0.64a4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b97dec68802d6fe835d7c722c7e5cefa919c369877f672e300a03cc30ad4585b |
|
MD5 | bcb6fdc695af21a5f17d3b6894aea7af |
|
BLAKE2b-256 | 525b3fb280f36d3290a9930cb30ad20649e852b1bff5857b8b0069d4f5dd2b78 |
Hashes for toad-0.0.64a4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a51ca4ae1404cd2a6e316e377699c5db484ec2b30fad6d9773ed15b75b8d7ae |
|
MD5 | 5f49130c21f3fbed768d5f2b10face82 |
|
BLAKE2b-256 | 6d2b2abd8ffe4181597c4f017b2555ecbf48235db194dbdbea7a38c991a2b98c |
Hashes for toad-0.0.64a4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb943f1c31ee3ae8ad4234e7a73e9dd7ef0d8fe596a942bf799898cecd7ee25 |
|
MD5 | ef238d759bc9b712188da2855ade1475 |
|
BLAKE2b-256 | 207e836cc15542cafa89008d3d54a85c2afdf4590cd872283da9f785abf3f3b7 |
Hashes for toad-0.0.64a4-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 788f0a8787e9ea3418462993ace64215c5551c410379d99476794502d0e316ed |
|
MD5 | 2e4732c3c520e139cfad42e5e0392333 |
|
BLAKE2b-256 | a133089c60e38ec70bf0ee77e52aba17ac3af847c8cf58121dc9f3e9c8cdecc7 |
Hashes for toad-0.0.64a4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f30fe8d52c4a42e63149c7766da410a422a2b8e38473af7d11b1c8693293cd1 |
|
MD5 | cf2c5bdc7f417581e82b7fbd519a1877 |
|
BLAKE2b-256 | f4a9a55ea9e101fb8a5919771cd714637c1c4cbc345dcd00f69be13d4ef5c6e6 |
Hashes for toad-0.0.64a4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e8d2e51154df2946cecc9f1dc559b5796d2b2b38cf5394b0e82ac360989a7ba |
|
MD5 | bbdc80eb523102ea146ed7870410f94b |
|
BLAKE2b-256 | 39fcc7d32e790ee4b69b0ccfa5979cef673e19b2e3322166bcc1944f0982deb1 |
Hashes for toad-0.0.64a4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18ff820965cac01719f9968a2a9b9a7d531faa70a4308fc72a8a1e0f0ec43745 |
|
MD5 | b5f8d4b2039e73456ca1a826f8e4f071 |
|
BLAKE2b-256 | b50bbbf6dc846e8e1a1abd177e3241391916ff9b4de3cdbbfae6e438d652bf57 |
Hashes for toad-0.0.64a4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19d0ca4e7ed3e9971bea7265f5346ae68c8c623d21258782b419d2a43b4d62b9 |
|
MD5 | 4e02f3db795091b786c9ab4aefeb9322 |
|
BLAKE2b-256 | 8a8cbf6351177a9281c4d73076021d3e789cf55377b676b691ce073ceef9d3cb |
Hashes for toad-0.0.64a4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7402e8397bc542630beac89e30679238183439d163aa953d2a04bb0622d6d604 |
|
MD5 | a102f3bced32e70a60d372c42da398cb |
|
BLAKE2b-256 | abe75b392f6e9a25c9ac2a66f522ea747dcee9afd8ec00bba1e2b1b790a974b2 |
Hashes for toad-0.0.64a4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feaf948d6e8ef85b258dda6347fb6fe1ce94d317d67097e639ebabe9b58ee81c |
|
MD5 | c1038f19caa11638a7e4842434bd51aa |
|
BLAKE2b-256 | 333070e78a663d7647ea8dcd997016188503fc60c87d0ef02e335f7197cd3b52 |
Hashes for toad-0.0.64a4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ea508950103dc936c9ffa7a53e559e1a3d9eb55f8ae5aed2003eaa4629e3b20 |
|
MD5 | f15489567ae2f835eb9a48ee38259576 |
|
BLAKE2b-256 | c8e1cabf8be444efae6987b14e40c40d9f34e66e35f0291ec45b227386a6e101 |
Hashes for toad-0.0.64a4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1015cf8283f3fbb87da0ad32c43d83c6745a10c7f63e964ccbfb53d2660d246 |
|
MD5 | de1d6e83c716be79bcc3c5f42de96aec |
|
BLAKE2b-256 | f003568350cd0f5a1681fc8586ed1fd021f2be04eb31bf10f32cf4e68e45df0b |
Hashes for toad-0.0.64a4-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 642010d5da5df0f375a071e62be87fb2cc0f8a393e7c0c36da91bc4234af2b4e |
|
MD5 | 2a7a4462d8ac81bb6b7b4d87c2115ef2 |
|
BLAKE2b-256 | fb99243d8e3a0fb4cdf95c0256d42e53c5afb0497820312631e3e53635df2171 |