A categorical feature is a feature that can only take a limited number of possible values.
True
Proposed by @svpino
True
Proposed by @svpino
Card 1 of 259. Answer: True
About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.
True. A categorical feature takes its values from a limited, usually fixed set of categories, or levels, such as blood type (A, B, AB, O), country or payment method. The values name groups instead of measuring amounts: a count such as number of children also has few possible values, but it is numeric.
Nominal categories, like blood type, have no order. Ordinal ones, like T-shirt sizes S, M, L and XL, have an order but no fixed spacing. Codes can look numeric and still be categorical: the average of two ZIP codes means nothing. Ordinal features are often mapped to 0, 1, 2, 3, while nominal ones are usually one-hot encoded.
A frequent interview trap is label-encoding a nominal feature: coding A, B, AB and O as 0, 1, 2 and 3 tells a linear model that O is three times as far from A as B is. Trees cope better; LightGBM and CatBoost handle categories natively. Summarize one with counts and the mode, not the mean.