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.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18458f0ccc73060bfa0e731571d4aa32b76295cc31830ff8ddf4d554744c849 |
|
MD5 | d899207906aa56c35aef30a8f77c2656 |
|
BLAKE2b-256 | 5e95f911b5ec09386a15f9c04b3c49c0b253f65edf77101998345d729927cb95 |
Hashes for toad-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be63d09adb99ccff5f478942ff322dcf30b2af259dc7d4179d7b9f63f79bb0c |
|
MD5 | c1b2ea5f297b26e66f77440f9ddecebe |
|
BLAKE2b-256 | a73f6fae0fb9dcd4996385a13c26554c755347a8fccdca45b0cb36a8064a24ad |
Hashes for toad-0.1.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a203a9a53b2f36e4778c406a06ec633810cbe9a1e0016410df951c8c1e2e0d |
|
MD5 | eb5adffb6e5ea8dd44170c27f2c637eb |
|
BLAKE2b-256 | 7474f74ef4424abcbc5c2a02d5a5cdba642588c89240846e791d54901ca90cff |
Hashes for toad-0.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d22615000d6e615be051b50db3cfc494bab7c66b1626f60f6be57ef115a7894 |
|
MD5 | 17b2bd99296b5361512daa833f51a1d6 |
|
BLAKE2b-256 | ceb6e1df40b49ebb2df1b119abc9409a6ba078d9e4d17f9609c944999ef1dc1a |
Hashes for toad-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30fa398b2e0d7898f341554e14294713754f297caa741b82424c637e23d38e45 |
|
MD5 | 6921d586e02f3670404e3894f2f39ab8 |
|
BLAKE2b-256 | 5424ab9356ab4f1e0882cd14279112c88168b1e74a9d3d10ab5e3ca0ff67dc42 |
Hashes for toad-0.1.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed95df5cbf5284cb1fdcdae98eaf5e093ce87cd48b478560b0240aa72c5079ef |
|
MD5 | 884681ea9b63735c2bcc67341f28be0e |
|
BLAKE2b-256 | 2e34b2a792e28aeca69a9b07526e1a846410540b20483130719ff550544d8305 |
Hashes for toad-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6271a4803bedd283f5b712eaa5b67fd7ba48b376fed7556e82c5eb82190c077 |
|
MD5 | 57b8945a83491e2123febc1f36a7651e |
|
BLAKE2b-256 | 123101847b783ddc7ed53f53feed0e1842da27891b446793cb8be97c4964f016 |
Hashes for toad-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d8a2f0a850fc500a1ed642e993dc80de83ba9f51024f1e80350398c5983226 |
|
MD5 | a1fb52d699fb68fe675516811b36b9d0 |
|
BLAKE2b-256 | 25fcb255fc25683f222a43893d60ddfb8dd91fc940060805e6c5ce75bc93378e |
Hashes for toad-0.1.2-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bfc8e2dce9ddaed0a73b9062269f2029fe75d77dbe5b7b0a753413aefbb56c2 |
|
MD5 | 24ccd37dd2405c964008bdebb73259bd |
|
BLAKE2b-256 | 64c5e6625d34cb72c1fbf1fa4ce70f8abc0be12c67f4c4a577bbedb5addc12c3 |
Hashes for toad-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052b4f8cc2c6e7a8459f5815dfae23ae6659bfb473667f84676f5805473414ef |
|
MD5 | a2b44d57eada83763ca99c98b55c73b5 |
|
BLAKE2b-256 | f62e6341fcef1f0b4284e3cea7a637d77e23a0da5282eef6177f548102c9e8f0 |
Hashes for toad-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f3c055ced155f20adb7701ea5a6def8504d6b999baf35303b80f191be07dbc3 |
|
MD5 | 70e79c204952bbf362bbe4efea76ca43 |
|
BLAKE2b-256 | b98617fcf343123cd3b86235d7e29c15dde1c4586722ba9825914cf935edbb62 |
Hashes for toad-0.1.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a62c46ea38fc8b9e10ef2ca01a9a4ac6545316a56ff6cd36e7ec20595647b73 |
|
MD5 | 35f22783e7ce87439d0a5459353e4cd8 |
|
BLAKE2b-256 | 25a0345ef4d2eec0b3f71a30552c0dce9aee0ac713aee03c50e74762bb94108e |
Hashes for toad-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7262ab6de078ec6b93fde2b510284f99511f2bd4f7c780ab9c1b1548fd569d5a |
|
MD5 | ec14e1ea3c143e1bf0fac86bde19ffbb |
|
BLAKE2b-256 | d7d99f05824ce2ecfac97ef37888e6cbf6da29d5c57c91caf82cc04c4d8af0b7 |
Hashes for toad-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799fb8d02f2fe1e2d05b839790f1f20045a4a80f933a842e7a5312b00a16aee3 |
|
MD5 | 2379d001a78fe0cb735059a552480f46 |
|
BLAKE2b-256 | 8077b51ca62a014314a30a8b6df853dcaed88d8ccca25667c3e2da361ebdee63 |
Hashes for toad-0.1.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bad3049f8456a2e0835cc92037651161f351dde9d78aab9e3f4b9f21c9071af0 |
|
MD5 | bdcd36fd8a2c72c4d8e6d8d42bd4183e |
|
BLAKE2b-256 | f144bac6ff70602c9914329faa5d0403bb1fbbe5a2b49a42fa6d6c611bf9264d |