Features having a discrete set of possible values. For example, consider a categorical feature named house style
, which has a discrete set of three possible values: Tudor, ranch, colonial
. By representing house style
as categorical data, the model can learn the separate impacts of Tudor
, ranch
, and colonial
on house price.
Sometimes, values in the discrete set are mutually exclusive, and only one value can be applied to a given example. For example, a car maker
categorical feature would probably permit only a single value (Toyota
) per example. Other times, more than one value may be applicable. A single car could be painted more than one different color, so a car color
categorical feature would likely permit a single example to have multiple values (for example, red
and white
).
Categorical features are sometimes called discrete features.
Contrast with numerical data.
Add comment