Skip to main content

Toad is dedicated to facilitating model development process, especially for a scorecard.

Project description


PyPi version Python version Build Status Downloads Status

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 install toad # to install
pip install -U toad # to upgrade


conda install toad --channel conda-forge # to install
conda install -U toad --channel conda-forge # to upgrade

Source code

python 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.


  • Simple IV calculation for all features · 一键算IV:
  • Preliminary selection based on criteria · 根据特定条件的初步变量筛选;
  • and stepwise feature selection (with optimised algorithm) · 优化过的逐步回归:
selected_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(), axis=1), y = 'target', method = 'chi', min_samples = 0.05) 

# 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',
    base_score = 600,
    base_odds = 35 ,
    pdo = 60,
    rate = 2
)[col], final_data['target'])

Documents · 文档

Community · 社区

We welcome public feedback and new PRs. We hold a WeChat group for questions and suggestions.




Dedicated by The ESC Team

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toad-0.1.2.tar.gz (14.0 MB view hashes)

Uploaded source

Built Distributions

toad-0.1.2-cp311-cp311-win_amd64.whl (14.2 MB view hashes)

Uploaded cp311

toad-0.1.2-cp310-cp310-win_amd64.whl (14.2 MB view hashes)

Uploaded cp310

toad-0.1.2-cp39-cp39-win_amd64.whl (14.2 MB view hashes)

Uploaded cp39

toad-0.1.2-cp38-cp38-win_amd64.whl (14.2 MB view hashes)

Uploaded cp38

toad-0.1.2-cp37-cp37m-win_amd64.whl (14.2 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page