nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #89

You are creating a deep neural network classification model using a dataset with categorical input values. Certain columns have a cardinality greater than 10,000 unique values. How should you encode…

The correct answer is B. Convert the categorical string data to one-hot hash buckets. https://cloud.google.com/ai-platform/training/docs/algorithms/wide-and-deep If the column is categorical with high cardinality, then the column is treated with hashing, where the number of hash buckets equals to the square root of the number of unique values in the

Submitted by tom_us· Apr 18, 2026Data processing and feature engineering

Question

You are creating a deep neural network classification model using a dataset with categorical input values. Certain columns have a cardinality greater than 10,000 unique values. How should you encode these categorical values as input into the model?

Options

  • AConvert each categorical value into an integer value.
  • BConvert the categorical string data to one-hot hash buckets.
  • CMap the categorical variables into a vector of boolean values.
  • DConvert each categorical value into a run-length encoded string.

How the community answered

(69 responses)
  • A
    14% (10)
  • B
    75% (52)
  • C
    3% (2)
  • D
    7% (5)

Explanation

https://cloud.google.com/ai-platform/training/docs/algorithms/wide-and-deep If the column is categorical with high cardinality, then the column is treated with hashing, where the number of hash buckets equals to the square root of the number of unique values in the

Topics

#Categorical Encoding#Feature Engineering#High Cardinality#Deep Learning Inputs

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice