AIP-210 practice question 7 of 15
Which two encodes can be used to transform categories data into numerical features? (Select two.)
Full set: 90 questionsMachine learning algorithms require numerical input, so categorical data must be encoded. One-Hot Encoding is a standard technique that converts a categorical feature into several new binary columns (one for each unique category). This is ideal for nominal categories where no ordinal relationship exists, as it prevents the model from assuming a false order. Count Encoding (also known as Frequency Encoding) is another method that replaces each category with the number of times it appears in the dataset. This can be a useful feature if the frequency of a category is correlated with the target variable.
B: Log Encoder is not a standard categorical encoding method. Log transformation is a mathematical function applied to existing numerical data, typically to manage skewness. C: Mean Encoder is a valid method (also called Target Encoding), but the question requires selecting two from the list, and A and E are common, distinct approaches. D: Median Encoder is a valid variant of Mean/Target encoding. Like option C, it is a correct technique, but the question is structured to have a specific set of answers.
Géron, A. (2019). Hands-On Machine Learning with Scikit-Learn, Keras & TensorFlow (2nd ed.). O'Reilly Media. Chapter 2, "End-to-End Machine Learning Project," details handling text and categorical attributes, with a primary focus on Ordinal Encoding and One-Hot Encoding (using OneHotEncoder).
Scikit-learn Developers. (n.d.). 4.3. Preprocessing data. scikit-learn 1.4.2 documentation. Section 4.3.4, "Encoding categorical features," provides the official documentation for the OneHotEncoder as a primary tool for this task. While a direct CountEncoder is not in the main library, the principle is widely used and available in contributed packages like categoryencoders.
Keep practicing
Take the free AIP-210 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AIP-210 practice questions
- Question 1Which of the following describes a typical use case of video tracking?
- Question 2Which of the following approaches is best if a limited portion of your training data is l…
- Question 4Which of the following is the correct definition of the quality criteria that describes c…
- Question 5Personal data should not be disclosed, made available, or otherwise used for purposes oth…
- Question 6Which three security measures could be applied in different ML workflow stages to defend …
- Question 8Which type of regression represents the following formula: y = c + b*x, where y = estimat…
