You are running autoML experiments.
Although during automated ML experiments several featurization techniques are applied by autoML automatically, in this particular case you want to customize featurization process and, instead of using the default solution, you want to manually configure how the missing values in the ‘engine-size' column should be handled.
Which settings should you use in your code?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer: A.
Option A is CORRECT because in order to customize autoML's featurization transformers, you have to use the add_transformers_params of the FeaturizationObject; setting featurization to ‘FeaturizationConfig' is a precondition.
Option B is incorrect becausethe add_transformer_params of the FeaturizationConfig object can be used for customization.
The block_transformers is also a valid parameter but used for disabling some auto featurization algorithms.
Option C is incorrect because autoML's featurization must be set to ‘FeaturizationConfig' to enable customization of the automated featurization.
That's why setting it to ‘off' is incorrect.
Option D is incorrect because the add_transformer_params of the FeaturizationConfig object can be used for customization.
The block_transformers is also a valid parameter but used for disabling some auto featurization algorithms.
Value “average” is the default imputer strategy.
Reference:
The correct answer is A. AutoMLObject.featurization = ‘FeaturizationConfig'; featurization_config.add_transformer_params(Imputer
, [engine-size
], {"strategy": "median"}).
The question asks how to manually configure the featurization process for handling missing values in the 'engine-size' column. Featurization is the process of converting raw data into a format that can be used for machine learning, and autoML is a feature of Azure Machine Learning that automates many aspects of machine learning, including featurization.
In this case, we want to customize the featurization process for handling missing values in the 'engine-size' column. To do this, we need to use the FeaturizationConfig class, which allows us to customize the featurization pipeline. We also need to use the Imputer transformer, which is used to handle missing values by imputing a value for missing data.
The correct code for this scenario is to set the featurization to 'FeaturizationConfig', and then use the add_transformer_params method of the featurization_config object to add the Imputer transformer with the specified parameters. Specifically, we want to use the "median" strategy to impute missing values in the 'engine-size' column, which is specified in the third argument to add_transformer_params method as {"strategy": "median"}.
Therefore, the correct answer is A. AutoMLObject.featurization = ‘FeaturizationConfig'; featurization_config.add_transformer_params(Imputer
, [engine-size
], {"strategy": "median"}). Answer B is incorrect because blocked_transformers method blocks the specified transformers instead of adding them. Answer C is incorrect because turning off featurization will not allow us to customize the featurization process for handling missing values in the 'engine-size' column. Answer D is incorrect because it specifies the wrong strategy, "average", instead of "median".