# Ordered and unordered categorical features – terminology

In the famous book "The Elements of Statistical Learning" by Hastie et al., the authors denoted unordered categorical variables as qualitative variables / nominal variables / factors.

I wonder, do other statisticians strictly follow this or some authors can use these terms (qualitative variables / nominal variables / factors) not only for unordered categorical variables but also for ordered categorical variables?

• Is there any difference? Eventually you'll one-hot encode it, so it won't matter. Commented Nov 18, 2019 at 19:21
• I think there is difference. For example, label encoding for ordered categorical variable will usually give much better results than one-hot for tree-based methods because it will save internal order of variable. Next, in clustering task Murphy in his book (Machine Learning a probabilistic perspective) writes: "For ordinal variables, such as {low, medium, high}, it is standard to encode the values as real-valued numbers, say 1/3, 2/3, 3/3 if there are 3 possible values. One can then apply any dissimilarity function for quantitative variables, such as squared distance." Commented Nov 18, 2019 at 19:30
• I would strongly discourage vanilla label encoding, particularly when everyone's doing DNN. You can't value some variable values over the others. How would your metric distance benefit from label encoding anyway? Let's say you have: apple(0), pear(1), strawbeery(2), peanut(3). You want to tell me i can calculate distance from pear to apple, based on some arbitrary mapping? Isn't that nonsense? Each value is different without actual metric itself. If you want any meaningful distance you'll need One Hot anyway, which is just multiplication over sets. Commented Nov 18, 2019 at 19:39
• @Rodvi is not talking about fruits, which do not form ordered categories so there is no reason to encode them that way. But there exists ordinal categorical data. It's not the same thing. Commented Nov 18, 2019 at 20:09