Indicator Columns
Explore how to transform categorical data into one-hot encoded indicator columns with TensorFlow. Understand how to define categorical columns using vocabulary lists and convert them into indicator features for effective model input in retail sales forecasting projects.
We'll cover the following...
We'll cover the following...
Chapter Goals:
- Process the indicator feature columns used for the machine learning model’s input layer
A. One-hot indicators
The remaining non-numeric features in the dataset are the categorical features. Each of these features contains values that can be separated into a fixed number of distinct categories. For example, the 'IsHoliday' feature contains the categories 0 and 1, while the 'Type' feature contains the categories A, B, and C.
These two features specifically ('IsHoliday' ...