FE
FeatureFred2026-03-24
cfaLevel IIQuantitative MethodsMachine Learning
What pitfalls should I watch out for with one-hot encoding?
I one-hot encoded every categorical variable in my dataset and my OLS regression now produces NaN coefficients. What went wrong?
84 upvotes
AcadiFi TeamVerified Expert
AcadiFi Certified ProfessionalThree common pitfalls with one-hot encoding: the dummy variable trap, curse of dimensionality, and train/test category mismatch.
Unlock with Scholar — $19/month
Get full access to all Q&A answers, practice question explanations, and progress tracking.
No credit card required for free trial
📊
Master Level II with our CFA Course
107 lessons · 200+ hours· Expert instruction
#one-hot#multicollinearity#pitfalls
Related Questions
What risk measures does GIPS require in composite presentations?
cfa·Level III·55 upvotes
What's the difference between GIPS verification and performance examination?
cfa·Level III·61 upvotes
How do TIPS protect against deflation, and is the protection complete?
cfa·Level II·69 upvotes
What are the GIPS Advertising Guidelines and when should a firm use them?
cfa·Level III·43 upvotes
How does the carry trade work in fixed income?
cfa·Level III·93 upvotes
Join the Discussion
Ask questions and get expert answers.