AWS Certified Machine Learning - Specialty: SageMaker Linear Learner Algorithm Hyperparameter Settings for Discrete Results

SageMaker Linear Learner Algorithm Hyperparameter Settings

Question

You work for a retail firm that wishes to conduct a direct mail campaign to attract new customers.

Your marketing manager wishes to get answers to questions that can be put into discrete categories, such as “using historical customer email campaign responses.

Should this customer receive an email from our current campaign?” You decide to use the SageMaker Linear Learner algorithm to build your model.

Which hyperparameter setting would you use to get the algorithm to produce discrete results?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: B.

Option Ais incorrect because the objective hyperparameter is set to reg:logistic when using the XGBoost algorithm (See the AWS SageMaker developer documentation: https://docs.aws.amazon.com/sagemaker/latest/dg/xgboost_hyperparameters.html).

Option B is correct because the AWS SageMaker documentation states that you set the predictor type hyperparameter to binary_classifier when using the Linear Learner algorithm for this type of discrete classification problem.

(See the AWS SageMaker documentation: https://sagemaker.readthedocs.io/en/stable/linear_learner.html).

Option C is incorrect because the predictor_type hyperparameter is set to regressor when you are using the Linear Learner algorithm for answers that are quantitative, not discrete (See the AWS SageMaker documentation: https://sagemaker.readthedocs.io/en/stable/linear_learner.html).

Option D is incorrect because the objective hyperparameter is set to reg:linear when you are using the XGBoost algorithm for quantitative answers (See the AWS SageMaker developer documentation: https://docs.aws.amazon.com/sagemaker/latest/dg/xgboost_hyperparameters.html).

Reference:

Please see the AWS SageMaker developer guide titled Using Amazon SageMaker Built-in Algorithms: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html) for a complete description of the SageMaker hyperparameter settings.

The correct answer is B. Set the predictor_type hyperparameter to binary_classifier.

When using the SageMaker Linear Learner algorithm to build a model that produces discrete results, we need to set the hyperparameter predictor_type to binary_classifier. This hyperparameter is used to specify the type of problem that we are trying to solve, and in this case, we are trying to perform binary classification, where the model will predict whether a customer should receive an email from the current campaign or not.

Setting the predictor_type hyperparameter to binary_classifier will ensure that the model produces discrete results, which are binary values of either 0 or 1. A value of 1 will indicate that the customer should receive an email, while a value of 0 will indicate that the customer should not receive an email.

The other hyperparameters mentioned in the answer choices are not suitable for this problem. Setting the objective hyperparameter to reg:logistic (Answer A) would be appropriate if we were trying to perform logistic regression, which is a type of binary classification algorithm. However, since we are using the SageMaker Linear Learner algorithm, we should set the predictor_type hyperparameter instead.

Setting the predictor_type hyperparameter to regressor (Answer C) would be appropriate if we were trying to perform regression, which is a type of machine learning algorithm that predicts continuous values. However, since we are trying to predict binary values (0 or 1), we should use binary classification instead.

Setting the objective hyperparameter to reg:linear (Answer D) would be appropriate if we were trying to perform linear regression, which is a type of regression algorithm that predicts continuous values. However, since we are trying to predict binary values, we should use binary classification instead.