DEA-C01 exam dumps

DEA-C01 practice question 392 of 550

AWS Certified Data Engineer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DEA-C01 Question 392

Single answer

You are working on a machine learning pipeline using Amazon SageMaker, and your dataset contains 1 billion rows. To speed up the training process and reduce resource costs, you decide to sample the dataset. Which of the following sampling techniques would be most appropriate if you want to ensure that the representation of different classes in the dataset is preserved?

  1. A

    Random sampling

  2. B

    Stratified sampling

  3. C

    Systematic sampling

  4. D

    Cluster sampling

Show answer and explanation

Correct answer: B

Explanation

Stratified sampling is the best choice when you want to ensure that the sampled dataset maintains the same class distribution as the original dataset. This is particularly important in machine learning tasks where class imbalance can significantly impact the model's performance.

  • A. Incorrect.

    Random sampling selects rows randomly without considering the distribution of classes. This can lead to an imbalanced dataset, especially if the classes are unevenly distributed.

  • B. Correct.

    Stratified sampling ensures that the representation of each class in the dataset is preserved by sampling proportionally from each class. This is ideal for machine learning tasks where class balance is critical.

  • C. Incorrect.

    Systematic sampling selects rows at regular intervals, which does not account for class distribution and may lead to biased samples.

  • D. Incorrect.

    Cluster sampling divides the dataset into clusters and randomly selects entire clusters for sampling. This method does not guarantee the preservation of class distribution.

Timed practice exam

Take a DEA-C01 practice test under exam conditions

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

Start timed exam