## Woe of Python: introduction, installation and usage of the function of woe Library

A Virgo procedural ape 2020-11-13 05:52:13
woe python introduction installation usage

Python And woe：woe Introduction to library functions 、 install 、 A detailed introduction to how to use

Catalog

woe Introduction to library functions

1、 Discrete value box principle

2、 The principle of continuous value box

woe Installation of library functions

woe How to use library functions

1、woe Module function tree

# woe Introduction to library functions

woe The conversion tool is mainly used in the scorecard model of credit rating . stay woe in , The principle of dividing variables into boxes is similar to binary decision tree , The objective function that determines how to divide is iv value . The characteristics are as follows ：

• be based on IV The split tree of criteria
• Rich model evaluation methods
• use the same pattern , The output is convenient
• IV Storage of trees for future use

Official website https://github.com/boredbird/woe

## 1、 Discrete value box principle

Treat each value as a group , Count groups woe value , Calculate again IV value .

## 2、 The principle of continuous value box

• Computing the whole data as a group of IV value （ Name it IV0）;
• Sort all values , According to the biggest , Minimum average partition 100 Value range （99 Interval segmentation points , Each segmentation point can divide the whole data into two parts ）;
• For each segmentation point , Try grouping the left and right parts into two groups , Calculation IV value （ If in this group , There is a group on the left and right that has less data than the total amount of data 5%, Don't count this group IV）. obtain 99 The largest of the grouping methods in IV value （IVmax）;
• If this is the biggest IV value （IVmax） Greater than not grouped IV It's worth it 101%（IV0）, No segmentation . otherwise , With this segmentation point, the data is divided into left and right groups . Each group did it independently 1 step , Enter the next cycle .
• According to all the grouping points recorded, the data are grouped as a whole , Calculation IV.

# woe Installation of library functions

pip install woe # woe How to use library functions

## 1、woe Module function tree

```|- __init__
|- config.py
| |-- config
| |-- __init__
| |-- change_config_var_dtype()
|- eval.py
| |-- compute_ks()
| |-- eval_data_summary()
| |-- eval_feature_detail()
| |-- eval_feature_stability()
| |-- eval_feature_summary()
| |-- eval_model_stability()
| |-- eval_model_summary()
| |-- eval_segment_metrics()
| |-- plot_ks()
| |-- proc_cor_eval()
| |-- proc_validation()
| |-- wald_test()
|- feature_process.py
| |-- binning_data_split()
| |-- calculate_iv_split()
| |-- calulate_iv()
| |-- change_feature_dtype()
| |-- check_point()
| |-- fillna()
| |-- format_iv_split()
| |-- proc_woe_continuous()
| |-- proc_woe_discrete()
| |-- process_train_woe()
| |-- process_woe_trans()
| |-- search()
| |-- woe_trans()
|- ftrl.py
| |-- FTRL()
| |-- LR()
|- GridSearch.py
| |-- fit_single_lr()
| |-- grid_search_lr_c()
| |-- grid_search_lr_c_main()
| |-- grid_search_lr_validation()```