# Is turning 'ordered' categorical data into numerical data advantages?

Let's say we want to predict house prices and have the following 3 features with their possible categorical values:

Slope of land property: 1) Gentle 2) Moderate 3) Severe

Type of utilities available: 1) All public Utilities 2) Electricity, Gas, and Water 3) Electricity and Gas

Style of dwelling: 1) 1s - One story 2) 1.5s - One and one-half story 3) 2s - Two story

Would it be acceptable/advantages to turn all those values into 1,2,3 integers (numerical data)? On the one hand it makes sense since e.g. 1s building is worse than 1.5s building which is worse than 2s building. On the other hand it's possible that the gap between 1s and 1.5s is much bigger than between 1.5s and 2s. How common/uncommon is this practice?

• What is the problem with treating these as categorical regressors in your model? Do you have so few data that you might be worried about losing degrees of freedom?
– whuber
Nov 10, 2016 at 21:12
• I understand feature engineering as a way of helping the algorithm to capture the right trend of the data. For example if I try to model the relationship between money and happiness and I know that 1 mil more makes you less happier when you are rich than when you are poor I might take a log of wealth feature and help the accuracy of my algorithm. Similarly, explicitly giving my algorithm the order of my feature might improve it. But I don't really know.. I'm new to ML. Nov 10, 2016 at 21:28
• Search our site for methods of representing ordinal predictors. The point here is that you've very few distinct values in any case: in a regression model, say, even treating the predictors as continuous, you'd only use six degrees of freedom to represent each with a quadratic basis function - equivalent to treating them as categorical. Nov 10, 2016 at 22:34