1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
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', indicators = ['iv'])
- 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
Metadata
Release files for toad 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toad-0.1.7.tar.gz | 14.8 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| toad-0.1.7-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ ARM64 | Details |
| toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 101.0 MB
Release files / toad-0.1.7.tar.gz
| Download URL | toad-0.1.7.tar.gz |
|---|---|
| Size | 14.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ebf791312fd41289ac475b702bd602419b39eeb0d73e0e62e6d237e5810a1e0
|
|
BLAKE2b-256 checksum How to use checksums |
2d42a35f8f0e92b5cd0d4519b06ba6adbed8b75a81033f5c13bc60f75aade5d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / toad-0.1.7-cp39-abi3-win_amd64.whl
| Download URL | toad-0.1.7-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
da87bba45467689c5ad436f9689241197e51a30e43e63a0ece19a9c35839d27a
|
|
BLAKE2b-256 checksum How to use checksums |
ad38b2ff12e366cd2bd4b3e45d0bab0155307e2135575fb9f4585079bf282e81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8fd1cbae25f4c1ea87dddc3be79f1a60293a18d438b9326c367d33dbe795af28
|
|
BLAKE2b-256 checksum How to use checksums |
e56c26a4798f1575182134e64c76a5cdda50c66383419cd049f12dc91d515f4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
7fdbc61d4c931bef60f677cd85b63ed4b879fbd247680a4831d4a8e190f86c6c
|
|
BLAKE2b-256 checksum How to use checksums |
d62bd7c1b42183df348d32a051d7fe1763694fc570217f60de54f7ad6d4455db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
628f1d7157325200b8402fd1e9c75fa16e0345240c5daa2673358bea89fd47ea
|
|
BLAKE2b-256 checksum How to use checksums |
50026ed1906fc487396d7b6c4314b793e9bae030328c5143eb6d143ad631c1cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ecbe95546e406c6b26cd9dcbd6dab7e28dbc8967585496b1a034453f3790381d
|
|
BLAKE2b-256 checksum How to use checksums |
325de2e1dc03306241e10bfdfc6e2766fe160140b0419bffe7fc8b6f79903f00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|