ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 73 - Professional Data Engineer discussion

Report
Export

Which TensorFlow function can you use to configure a categorical column if you don't know all of the possible values for that column?

A.
categorical_column_with_vocabulary_list
Answers
A.
categorical_column_with_vocabulary_list
B.
categorical_column_with_hash_bucket
Answers
B.
categorical_column_with_hash_bucket
C.
categorical_column_with_unknown_values
Answers
C.
categorical_column_with_unknown_values
D.
sparse_column_with_keys
Answers
D.
sparse_column_with_keys
Suggested answer: B

Explanation:

If you know the set of all possible feature values of a column and there are only a few of them, you can use categorical_column_with_vocabulary_list. Each key in the list will get assigned an autoincremental ID starting from 0.

What if we don't know the set of possible values in advance? Not a problem. We can use categorical_column_with_hash_bucket instead. What will happen is that each possible value in the feature column occupation will be hashed to an integer ID as we encounter them in training.

Reference: https://www.tensorflow.org/tutorials/wide

asked 18/09/2024
Adrian Petrisoaia
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first