Skip to main content

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

Project description

TOAD

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

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

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

toad-0.1.7.tar.gz (14.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

toad-0.1.7-cp39-abi3-win_amd64.whl (17.1 MB view details)

Uploaded CPython 3.9+Windows x86-64

toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl (17.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ ARM64

toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl (17.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file toad-0.1.7.tar.gz.

File metadata

  • Download URL: toad-0.1.7.tar.gz
  • Upload date:
  • Size: 14.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toad-0.1.7.tar.gz
Algorithm Hash digest
SHA256 1ebf791312fd41289ac475b702bd602419b39eeb0d73e0e62e6d237e5810a1e0
MD5 af3b9e18a67db89106c1a6f03b6ab763
BLAKE2b-256 2d42a35f8f0e92b5cd0d4519b06ba6adbed8b75a81033f5c13bc60f75aade5d2

See more details on using hashes here.

File details

Details for the file toad-0.1.7-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: toad-0.1.7-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 17.1 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toad-0.1.7-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 da87bba45467689c5ad436f9689241197e51a30e43e63a0ece19a9c35839d27a
MD5 589a0c0737c631893653a192ecc27dec
BLAKE2b-256 ad38b2ff12e366cd2bd4b3e45d0bab0155307e2135575fb9f4585079bf282e81

See more details on using hashes here.

File details

Details for the file toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toad-0.1.7-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8fd1cbae25f4c1ea87dddc3be79f1a60293a18d438b9326c367d33dbe795af28
MD5 e11c267ca2527c7f5294720e20ba489b
BLAKE2b-256 e56c26a4798f1575182134e64c76a5cdda50c66383419cd049f12dc91d515f4d

See more details on using hashes here.

File details

Details for the file toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for toad-0.1.7-cp39-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7fdbc61d4c931bef60f677cd85b63ed4b879fbd247680a4831d4a8e190f86c6c
MD5 2ea10106a390d8502e6db812fedbc649
BLAKE2b-256 d62bd7c1b42183df348d32a051d7fe1763694fc570217f60de54f7ad6d4455db

See more details on using hashes here.

File details

Details for the file toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toad-0.1.7-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 628f1d7157325200b8402fd1e9c75fa16e0345240c5daa2673358bea89fd47ea
MD5 9a3ec96a80714ad2353db20e166246d0
BLAKE2b-256 50026ed1906fc487396d7b6c4314b793e9bae030328c5143eb6d143ad631c1cb

See more details on using hashes here.

File details

Details for the file toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toad-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ecbe95546e406c6b26cd9dcbd6dab7e28dbc8967585496b1a034453f3790381d
MD5 c6cd50cfa56abaaf0e11f595f7b9e72e
BLAKE2b-256 325de2e1dc03306241e10bfdfc6e2766fe160140b0419bffe7fc8b6f79903f00

See more details on using hashes here.

Supported by

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