LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Google Professional Data Engineer

Google Professional Data Engineer

Get started today

Ultimate access to all questions.


When working with TensorFlow, which function should you use to define a categorical column if the complete set of possible values for that column is unknown?

Real Exam



Explanation:

If the complete set of possible feature values for a column is unknown, categorical_column_with_hash_bucket is the appropriate function to use. This function hashes each possible value in the feature column to an integer ID as they are encountered during training, eliminating the need to know all possible values upfront. For cases where all possible values are known and limited in number, categorical_column_with_vocabulary_list would be more suitable, as it assigns an auto-incremental ID starting from 0 to each key in the list. Reference: TensorFlow Documentation

Powered ByGPT-5