Skip to content
Statistics

What is the difference between a nominal and an ordinal feature?

Nominal data names categories with no natural order, ex: eye color, city or payment method. Ordinal data has categories with a meaningful order but no fixed spacing between them, ex: grades A, B, C, D, E and F.

datasciencetrivia.com

Card 1 of 259. Answer: Nominal data names categories with no natural order, ex: eye color, city or payment method. Ordinal data has categories with a meaningful order but no fixed spacing between them, ex: grades A, B, C, D, E and F.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

A nominal feature has categories with no natural order, such as eye color, city or payment method. An ordinal feature has categories with a meaningful order but no fixed distance between them, such as education level (high school, bachelor's, master's, PhD) or grades A to F. Both are categorical.

The terms come from Stanley Smith Stevens's 1946 levels of measurement: nominal, ordinal, interval and ratio. Nominal data supports counts and the mode. Ordinal data adds the median, percentiles and rank methods such as Spearman's correlation. A mean of ordinal codes assumes the step from A to B equals the step from D to E, which nothing guarantees.

In machine learning, ordinal features are usually encoded as integers in their natural order, 0 to 3 for education, though a linear model then assumes equal steps. Nominal features get one-hot, target or count encoding, since any order would be invented. Binary features like pass/fail are a gray area: one outcome is better, but either way the column is 0/1.

All questions