python utils for detect data
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.
Install
Pip
pip install toad
Conda
conda install toad --channel conda-forge
Source code
python setup.py install
Upgrade
Pip
pip install -U toad
Conda
conda install -U toad --channel conda-forge
Key features
- Simple IV calculation for all
toad.quality(data,'target',iv_only=True)
- Optimised stepwise feature selection algorithm, and selection by criteria
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.
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.0.61.tar.gz
(14.0 MB
view hashes)
Built Distributions
Close
Hashes for toad-0.0.61-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0933758f43ee722f82d707c54178e0dbcfe4ea26d3db60511c5cb802d2218020 |
|
MD5 | e8df137c59bf2cc93043b4f67ff8d25a |
|
BLAKE2b-256 | fd25399edc074277ed6ef966671a94871b7bb72e08da06f15f4fa2c4cb046790 |
Close
Hashes for toad-0.0.61-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49aa3ab9282f6cb634f41850d05713423d463980ba9433854fb010553cc65dda |
|
MD5 | 8634133375b65991dad0acd4899f20d3 |
|
BLAKE2b-256 | 4442c5613a5ea05c0979536c2f3c2aba447b5e9a48a11da9a9e70dffae2e6d78 |
Close
Hashes for toad-0.0.61-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 471e0257b4d91f110de4e59a007d3a5bb116e70b8028faa9fba3b949041b2cc7 |
|
MD5 | 3ffecb0e4472a780753bab577655f617 |
|
BLAKE2b-256 | dfd5b72748eca57c04eb3186742de715df6abb5c0d4de0334f43964d7d794a79 |
Close
Hashes for toad-0.0.61-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b612b5425a6879e3a3f5fd844a260232fdfd420025308e5d3a14becc7a09348 |
|
MD5 | a49c1d054b8f99ea602532ee2d6f08db |
|
BLAKE2b-256 | 7127725c2ba5808e2dba2e1e6f2bc39447d87adc61d31f331a87cdb7817d9bd9 |
Close
Hashes for toad-0.0.61-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dc4c55b6dd0961962cc5152bbfde1396dd312441c4f724230cee34d6f8ebef1 |
|
MD5 | be72dffdfb5c465f1ab9467c3bfe976c |
|
BLAKE2b-256 | 70617b2c2db74f54a86ff120c2b98fdf9d19c9b3e954d01387cc8db3554905b9 |
Close
Hashes for toad-0.0.61-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df738e861bde1d20fdad53c8a302b94a3e26f2f58ddbd027f28db6e73051c97c |
|
MD5 | 0c706907d39396e70ac3d7a32524e601 |
|
BLAKE2b-256 | 92f5bced2a64bc4e138d1e15dcdcb50a5af18a2d73586a4c24196c46583d0922 |
Close
Hashes for toad-0.0.61-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a76ecc2bd8a0fa38659245e0d265e1379a625c698d57bcfbd0e76a1f7043fc |
|
MD5 | dee7161711b098319fbfce3fb3c674ec |
|
BLAKE2b-256 | b236a30cd71dce5524394caf208620cb281b9ad4adaeee34274749e52325bdc4 |
Close
Hashes for toad-0.0.61-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56c5326acd2c469f6c70d89c4de2c917015e06132f64241889249bae4a2e2c55 |
|
MD5 | ff6b466de8c23a80ad473d4278f59f98 |
|
BLAKE2b-256 | 740da5ddf9d1e8672614797393591ffb5b97310031a06da9b79f5bc5c41922f6 |
Close
Hashes for toad-0.0.61-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43505af6e401d189b0003f4494a5ff6819a2aa2b098043312a1b1d6ed97f78f2 |
|
MD5 | 432ad96e9e0ba7d27dfc1a0272c14a62 |
|
BLAKE2b-256 | e7d277511fb3c3723126ea08090e13a13c337006248ff147922452edeb7b5ea6 |
Close
Hashes for toad-0.0.61-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 019a50e5b26c02b9208dd67878bce1f1605480f2c58fccc66731375ff40fcd2f |
|
MD5 | fa4386f638bc7e1e218d412f42213cfa |
|
BLAKE2b-256 | 9912d1f51c99b61edda6925f9764df25b88a9937c4186fdb34a00aafa31e4aa2 |
Close
Hashes for toad-0.0.61-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88a2eb0ddcdcf4b5f7b445bd3be658f678db678e0b3182c8af3de694bd4b578d |
|
MD5 | d31db92cd44659cdf26cf8761c25ed12 |
|
BLAKE2b-256 | 020993dcec96ee022cb62cd61255d899d8d783278cfbfc9410da8d9b9907d984 |
Close
Hashes for toad-0.0.61-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eeb83146272828f487dec14d88de0a7bb8b8df2fb52a4881a7a2cc76cfa5b6e |
|
MD5 | f60596f136168e5579bd207d5b73bdd0 |
|
BLAKE2b-256 | d2a668b9196bc9e5cf2416175ae4e59e177f7f20eee39ff5028b22bd0c1ee27d |