Google News
logo
Machine Learning - Interview Questions
Why do we need to convert categorical variables into factor? Which functions are used to perform the conversion?
Most Machine learning algorithms require number as input. That is why we convert categorical values into factors to get numerical values. We also don't have to deal with dummy variables.
 
The functions factor() and as.factor() are used to convert variables into factors.
Advertisement