AWS Certified Machine Learning - Specialty Exam: Loss Function Hyperparameter Setting

Binary Classification in Amazon SageMaker

Question

You work in the machine learning department of a major retail company.

Your team is working on a model to predict the region with the highest sales for a given quarter.

You have selected your observations from past sales cycles for all regions and split your data into training and evaluation datasets.

You are now training your linear learner model in Amazon SageMaker.

You are trying to select the model hyperparameters that give your team the best predictions. You have set the predictor_type hyperparameter to binary_classifier.

Which loss function hyperparameter setting is NOT one of your options?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: D.

Option A is incorrect.

The three hyperparameters values that you can set for the loss function are auto, logistic, and hinge_loss.

The default for auto is logistic.

Option B is incorrect.

The three hyperparameters values that you can set for the loss function are auto, logistic, and hinge_loss.

The default for auto is logistic.

Option C is incorrect.

The three hyperparameters values that you can set for the loss function are auto, logistic, and hinge_loss.

The default for auto is logistic.

Option D is correct.

The three hyperparameters values that you can set for the loss function are auto, logistic, and hinge_loss.

The default for auto is logistic.

The softmax_loss setting is an option if your predictor_type is set to multiclass_classifier.

Reference:

Please see the Amazon SageMaker developer guide titled Linear Learner Hyperparameters.

In Amazon SageMaker's linear learner algorithm, the loss function hyperparameter is used to determine the type of loss function to be used for training the model. The loss function is used to measure the error between the predicted output and the actual output.

The options for the loss function hyperparameter in the binary classification problem are as follows:

A. Auto: The linear learner algorithm automatically selects the appropriate loss function based on the problem type, i.e., binary classification, multiclass classification, or regression.

B. Logistic: This loss function is used for binary classification problems. It calculates the negative log-likelihood of the predicted probability distribution of the positive class.

C. Hinge_loss: This loss function is also used for binary classification problems. It calculates the maximum margin loss, which is the distance between the decision boundary and the closest point from each class.

D. Softmax_loss: This loss function is used for multiclass classification problems. It calculates the cross-entropy loss for the predicted probability distribution of each class.

Therefore, the option that is NOT one of the valid options for the loss function hyperparameter in a binary classification problem is D. Softmax_loss.