AWS Machine Learning Specialty (MLS-C01) · 24% practice allocation

AWS MLS-C01: Exploratory Data Analysis Practice Questions

5 free sample questions from the Exploratory Data Analysis domain, with answers and explanations. The full MLS-C01 bank has 212 questions across 4 domains. Questions are scenario-based and written from the official AWS exam guide.

1.

A data scientist at an e-commerce company is performing EDA on a product recommendation dataset. A categorical feature 'product_category' has 3,200 unique values (high cardinality). The scientist considers three encoding strategies before training a SageMaker built-in Factorization Machines model. Which statement MOST accurately compares these strategies for this specific scenario?

  • A. Ordinal encoding is best because it assigns a unique integer to each category, preserving all category information without increasing dimensionality
  • B. One-hot encoding should be preferred because it is always lossless and Factorization Machines handle sparse input efficiently✓ Correct
  • C. Target encoding is always the safest choice because it reduces dimensionality to a single column without any risk of overfitting
  • D. Hashing (feature hashing) is not suitable for Factorization Machines because it requires dense input vectors
Explanation

One-hot encoding a 3,200-cardinality feature produces a very sparse 3,200-dimensional binary vector per record. The SageMaker Factorization Machines algorithm is specifically designed to work efficiently with sparse input (it accepts data in sparse RecordIO-protobuf format), making one-hot encoding a legitimate and common choice. Ordinal encoding assigns arbitrary integers (e.g., 1–3200) with no ordinal meaning, implying false numeric relationships between unrelated categories — this can mislead distance-based or linear models and is not recommended for nominal high-cardinality features. Target encoding reduces dimensionality to a single numeric column but is prone to target leakage and overfitting when applied naively without proper cross-validation folds, making 'always the safest choice' incorrect. Hashing (feature hashing) maps categories to a fixed-size hash space and produces sparse output compatible with Factorization Machines — the claim that it requires dense input is incorrect.

2.

A retail company stores transactional data in Amazon S3 in Parquet format. A data analyst needs to quickly compute the average purchase value, count distinct customers per region, and identify the top 10 product categories by revenue — all as part of an EDA workflow — without provisioning or managing any servers. Which AWS service is the MOST appropriate for this task?

  • A. Amazon SageMaker Processing, by running a Pandas-based script to load and aggregate the Parquet files
  • B. AWS Glue ETL jobs, by writing PySpark transformations to compute the aggregations
  • C. Amazon Redshift Spectrum, by creating external tables pointing to the S3 Parquet files
  • D. Amazon Athena, by running SQL queries directly against the S3 Parquet files using a data catalog✓ Correct
Explanation

B) Correct: Amazon Athena is a fully serverless, interactive query service that runs SQL directly on data stored in S3 (including Parquet format) using the AWS Glue Data Catalog. It requires no infrastructure provisioning, making it ideal for ad-hoc EDA aggregations at scale. A) Incorrect: Redshift Spectrum can query S3 data but requires an active Redshift cluster to be provisioned and managed, which contradicts the serverless requirement. C) Incorrect: AWS Glue ETL jobs are designed for batch transformation pipelines, not interactive EDA; they also have higher startup overhead and are not query-oriented. D) Incorrect: SageMaker Processing can run Pandas scripts but requires launching a managed compute instance and loading data into memory, which is less scalable and efficient than Athena for SQL-based aggregations on large Parquet datasets.

3.

A data scientist is performing exploratory data analysis on a large dataset stored in Amazon S3. The dataset contains 500 GB of CSV files, and the scientist needs to quickly compute summary statistics and identify the distribution of values in a specific column using standard SQL without provisioning any servers. Which AWS service is MOST appropriate for this task?

  • A. Amazon EMR cluster with Apache Hive
  • B. AWS Glue ETL job with a PySpark script
  • C. Amazon Athena querying the S3 data directly✓ Correct
  • D. Amazon Redshift Spectrum with a provisioned cluster
Explanation

Amazon Athena is the correct choice because it is a serverless, interactive query service that allows you to run standard SQL queries directly against data stored in Amazon S3 without any infrastructure provisioning. It is purpose-built for ad-hoc EDA at scale. — Amazon Redshift Spectrum requires a provisioned Redshift cluster as the query coordinator, so it is not fully serverless and adds unnecessary overhead for simple EDA. — AWS Glue ETL jobs use PySpark and are optimized for batch data transformation pipelines, not interactive SQL-based exploration. — Amazon EMR requires cluster provisioning and management, which contradicts the 'no server provisioning' requirement.

4.

A machine learning engineer is using Amazon SageMaker Data Wrangler to prepare a tabular dataset for training. After importing the data, they notice that a numeric feature has approximately 18% of its values missing. The feature has a heavily right-skewed distribution. Which imputation strategy available in SageMaker Data Wrangler is MOST appropriate for this situation?

  • A. Most-frequent (mode) imputation, because it preserves the most common observed value
  • B. Mean imputation, because it minimizes the sum of squared errors across all imputed values
  • C. Median imputation, because it is robust to skewed distributions and outliers✓ Correct
  • D. Forward-fill imputation, because it is the default strategy in SageMaker Data Wrangler
Explanation

Median imputation is the correct choice for a heavily right-skewed distribution. The median is a robust statistic unaffected by extreme values or skew, making it a better central tendency measure than the mean in this scenario. — Mean imputation is problematic for skewed distributions because the mean is pulled toward the tail, causing the imputed values to be unrepresentative of the typical value. — Mode imputation is appropriate for categorical variables or discrete numeric features with a clear dominant value, not for continuous skewed numeric data. — Forward-fill is a time-series technique that uses the previous row's value and is inappropriate for cross-sectional tabular data with no meaningful row ordering.

5.

An ML engineer is performing EDA on a dataset in Amazon SageMaker Studio. The dataset contains a feature 'transaction_amount' with several extreme values (e.g., values 20 standard deviations above the mean). The engineer wants to detect these outliers programmatically. Which THREE of the following are valid outlier detection methods the engineer could implement in a SageMaker Studio notebook? (Select THREE)

  • A. Isolation Forest algorithm: train an unsupervised anomaly detection model on the feature✓ Correct
  • B. Min-Max Scaling: rescale all values to [0,1] to eliminate the effect of outliers
  • C. Drop the feature entirely if any outlier is detected
  • D. Z-score method: flag observations where |z| > 3 as outliers✓ Correct
  • E. Interquartile Range (IQR) method: flag observations below Q1 - 1.5×IQR or above Q3 + 1.5×IQR✓ Correct
Explanation

A) Correct: The Z-score method is a standard statistical technique for detecting outliers in approximately normal distributions; values with |z| > 3 are typically flagged as outliers. B) Correct: The IQR method is a robust, distribution-free technique for outlier detection that does not assume normality; it is especially effective for skewed distributions. C) Correct: Isolation Forest is a well-established unsupervised machine learning algorithm for anomaly/outlier detection that works by randomly isolating observations; it is available in scikit-learn and can be run in a SageMaker Studio notebook. D) Incorrect: Min-Max Scaling rescales values to a fixed range but does not detect or remove outliers — extreme values will still dominate the scaled range and distort the scaling for other observations. E) Incorrect: Dropping an entire feature because it contains outliers is an extreme and inappropriate action; the correct approach is to handle the outlier observations (cap, transform, or remove them), not the feature itself.

Test yourself across every MLS-C01 domain

The free MLS-C01 practice test mixes about 20 questions weighted like the exam. The full 212-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Exploratory Data Analysis study guide (MLS-C01) →

Other MLS-C01 domains

← All AWS Machine Learning Specialty study resources