Good day,
Use tf.cast
to cast the label key to float32 and fill in the missing values.
traffic_volume = tf.cast(inputs[_VOLUME_KEY], dtype=tf.float32)
# Create a feature that shows if the traffic volume is greater than the mean and cast to an int
outputs[_transformed_name(_VOLUME_KEY)] = tf.cast(
# Use `tf.greater` to check if the traffic volume in a row is greater than the mean of the entire traffic volumn column
tf.greater(_, _(tf.cast(inputs[_VOLUME_KEY], tf.float32))),
tf.int64)
### END CODE HERE
return outputs
It says I should add missing values however when I search the discussion forum i keep seeing a reference to a _fill_in_missing function. It appears in some peoples code but I don’t see it anywhere in my notebook. Is this something we must add ourselves?