What do Box-Cox and Yeo-Johnson transforms do?
mediumAnswer
- Both are power transforms that find a lambda making the data approximately Gaussian and stabilizing variance.
- Box-Cox requires strictly positive data.
- Yeo-Johnson generalizes to any real values (including zero and negatives).
- They're useful for the target of a regression or heavily skewed features feeding a linear/Gaussian-based model.
- Not needed for tree ensembles (monotone-invariant) or for deep nets (BatchNorm handles it).
Check yourself — multiple choice
- Box-Cox requires negative values
- Both are power transforms that Gaussianize data; Yeo-Johnson handles non-positive values
- Yeo-Johnson only handles positive values
- They only apply to categorical variables
Box-Cox: positive-only. Yeo-Johnson: any real. Both aim for Gaussianity + variance stability.
#feature-engineering#linear-regression
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- When should you add interaction features to a linear model?
- When does log-transforming the target help a regression model?
- Why does OLS have a closed-form solution but logistic regression doesn't?
- What are the classical assumptions of linear regression?
- How do you interpret a coefficient in a multiple linear regression?
- What is VIF and when do you worry about multicollinearity?