How to preprocess an ordered categorical variable to feed a machine learning algorithm?
I have a categorical variable that measures the income of a family:
A: no income
B: Up to $500
C: $500-$700
…
P: $5000-$6000
Q: More than \\\$6000
It seems odd to me that I have to get dummies for this variable, since it's ordered. I wonder if it's better to map the values: {'A': 0, 'B': 1, …, 'Q': 17}
so I can input it into the algorithm this values as integer numbers.
What's the proper way of preprocessing this variable to feed an algorithm such as Random Forest or a simple neural network?
Topic data-wrangling preprocessing dataset machine-learning
Category Data Science