Weight of Evidence (WOE) is a variable transformation technique for independent variables, originating from Information Theory. It measures the strength of each grouped attribute in predicting the desired value of the dependent variable. WOE is calculated by taking the natural logarithm (log to base e) of the division of the percentage of good (non-events) and the percentage of bad (events).
To calculate WOE, follow these steps:
- Check whether the variable is continuous or categorical.
- If continuous, split the data into 10 bins or other groups based on the distribution. Ideally, each bin must contain at least 5% cases.
- If categorical, ignore step 2.
- Find the number of good and number of bad values in each group.
- Calculate the percentage of good and percentage of bad.
- Use the above formula to calculate WOE.
Benefits of WOE include:
- Transforming continuous relationships with log odds, which can be difficult.
- Treating missing values by grouping them separately.
- Reducing the impact of outliers since WOE groups values to a specific category.
WOE is closely related to Information Value (IV), which is a numerical value that quantifies the predictive power of an independent continuous variable. IV is based on an analysis of each individual independent variable in turn without considering others. The two concepts are used together to explore data and screen variables in various applications, such as credit risk modeling and marketing analytics projects.