O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Imputing categorical variables

Imputing categorical variables can be trickier than imputation of numeric variables. Numeric imputation is based upon random variates, but imputation of categorical variables is based upon statistical tests with less power, such as Chi-square, and they can be rule-based, so if you end up imputing categorical variables, use with caution and run the results past some domain experts to see if it makes sense. You can use decision trees or random forests to come up with a prediction path for your missing values, and map them to a reasonable prediction value using the actual decision rules generated by the tree.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required