
Python Machine Learning By Example
By :

At first glance, the features in the preceding dataset are categorical – for example, male or female, one of four age groups, one of the predefined site categories, and whether the user is interested in sports. Such data is different from the numerical feature data we have worked with until now.
Categorical features, also known as qualitative features, represent distinct characteristics or groups with a countable number of options. Categorical features may or may not have a logical order. For example, household income from low to medium to high is an ordinal feature, while the category of an ad is not ordinal.
Numerical (also called quantitative) features, on the other hand, have mathematical meaning as a measurement and, of course, are ordered. For instance, counts of items (e.g., number of children in a family, number of bedrooms in a house, and number of days until an event ) are discrete numerical...