EasyDeepLearn

What is Weight of Evidence (WoE) encoding?

hard

Answer

  • For a binary target and each category c: WoE(c)  =  ln(P(x=c    y=1)  /  P(x=c    y=0))\mathrm{WoE}(c)\; = \;\operatorname{ln}(P(x = c\; \mid \;y = 1)\; / \;P(x = c\; \mid \;y = 0)) — the log-ratio of positive-class share to negative-class share within that category, offset by the global class ratio.
  • Comes from credit scoring: after WoE, categories are on a monotonic log-odds scale that plugs cleanly into logistic regression.
  • Also often reported alongside Information Value (IV = sum (P1 - P0) * WoE) to rank predictive features.
Check yourself — multiple choice
  • Encode categories by their alphabetical order
  • Log-ratio of positive vs negative class share per category — logistic-friendly, standard in credit scoring
  • Same as target encoding
  • Only used for regression

WoE  =  ln(P(xy=1)/P(xy=0))\mathrm{WoE}\; = \;\operatorname{ln}(P(x \mid y = 1) / P(x \mid y = 0)); logistic-friendly, standard in credit-risk models.

#encoding#features#feature-selection

Practise Supervised Learning

215 interview questions in this topic.

Related questions