Google Professional Machine Learning Engineer

Google Professional Machine Learning Engineer

Get started today

Ultimate access to all questions.


In the context of preparing data for machine learning models, you are working with a dataset that includes categorical variables such as 'color' with values like 'red', 'blue', and 'green'. The dataset also contains numerical features. Your goal is to preprocess this data to ensure it is suitable for a machine learning algorithm that requires numerical input. Considering the need for scalability and the preservation of information, which of the following techniques should you employ to transform the categorical data into a format suitable for machine learning algorithms? Choose one correct option.