MLS-C01 exam dumps

MLS-C01 practice question 244 of 389

AWS Certified Machine Learning - Specialty. Expert level, Amazon Web Services. Free question with the correct answer and a full explanation.

MLS-C01 Question 244

Single answer

You are building a machine learning model to predict customer churn using an imbalanced dataset. To ensure the model generalizes well, you decide to perform cross-validation. Which of the following approaches would be most appropriate for this scenario?

  1. A

    Perform K-Fold cross-validation without any adjustments for class imbalance.

  2. B

    Use Stratified K-Fold cross-validation to maintain the class distribution in each fold.

  3. C

    Perform Leave-One-Out cross-validation to maximize the use of the dataset.

  4. D

    Randomly split the dataset into training and validation sets multiple times without considering class balance.

Show answer and explanation

Correct answer: B

Explanation

Stratified K-Fold cross-validation is the most appropriate approach for imbalanced datasets because it ensures that each fold has a similar class distribution to the original dataset. This helps the model generalize better and provides a more reliable evaluation of its performance.

  • A. Incorrect.

    Performing K-Fold cross-validation without adjustments for class imbalance could lead to folds with uneven class distributions, especially in imbalanced datasets, resulting in biased evaluation or training.

  • B. Correct.

    Stratified K-Fold cross-validation maintains the class distribution in each fold, ensuring that both the training and validation sets have a representative proportion of each class. This is particularly useful for imbalanced datasets.

  • C. Incorrect.

    Leave-One-Out cross-validation uses a single data point for validation and all others for training, which can be computationally expensive and does not address the issue of class imbalance.

  • D. Incorrect.

    Randomly splitting the dataset into training and validation sets multiple times without considering class balance may result in unrepresentative splits, leading to biased model evaluation.

Timed practice exam

Take a MLS-C01 practice test under exam conditions

65 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam