Search⌘ K
AI Features

Float Features

Understand how to convert float-valued features from a DataFrame into TensorFlow FloatList Feature objects. Learn to create input feature dictionaries including key features like Temperature, FuelPrice, CPI, and Unemployment while correctly handling labels such as Weekly_Sales for training and evaluation. This lesson guides you in building an efficient data pipeline for machine learning.

Chapter Goals:

  • Add the float features of a DataFrame’s row to a feature dictionary

A. Adding float features

Similar to the integer valued features in the DataFrame row, we also convert the row’s float valued features when creating the Example object. Each of the float features will be represented by FloatList TensorFlow Feature objects after the row is converted to an Example.

From the analysis of our dataset, we know that the float valued features are 'Temperature', 'FuelPrice', 'CPI' ...