Fatskills
Practice. Master. Repeat.
Study Guide: Cloud ML - AWS Certified Machine Learning Engineer – Associate (MLA-C01): Data Types and Distributions (Structured vs Unstructured, Normal, Poisson)
Source: https://www.fatskills.com/machine-learning-101/chapter/cloud-ml-cert-aws-ml-data-types-and-distributions-structured-vs-unstructured-normal-poisson

Cloud ML - AWS Certified Machine Learning Engineer – Associate (MLA-C01): Data Types and Distributions (Structured vs Unstructured, Normal, Poisson)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~7 min read

AWS_ML – Data Types and Distributions (Structured vs Unstructured, Normal, Poisson)


AWS Certified Machine Learning – Specialty: Data Types & Distributions (Structured vs. Unstructured, Normal, Poisson) – Exam-Ready Study Guide



What This Is

Data types and distributions are the foundation of any ML pipeline. Structured data (tables, rows, columns) powers traditional ML (e.g., fraud detection in banking transactions), while unstructured data (text, images, audio) fuels deep learning (e.g., sentiment analysis on customer reviews). Understanding distributions (Normal, Poisson, etc.) helps you pick the right algorithms, detect anomalies, and avoid biased models. For example: - A ride-sharing app uses Poisson distribution to predict demand spikes (e.g., Friday nights) and optimize driver allocation.
- A healthcare AI analyzing X-rays (unstructured) must preprocess images differently than structured EHR data (e.g., patient age, lab results).

Mastering this topic ensures you choose the right AWS services (e.g., SageMaker Processing for structured data, Rekognition for unstructured) and avoid costly mistakes in feature engineering.


Key Terms & Services


Data Types

  • Structured Data:
    Tabular data (rows/columns) stored in databases (e.g., Amazon RDS, Redshift) or files (CSV, Parquet). Used in regression/classification (e.g., SageMaker XGBoost).
    Example: Customer churn prediction using transaction history.

  • Unstructured Data:
    Non-tabular data (text, images, video, audio). Stored in S3, DynamoDB (for metadata), or OpenSearch (for search). Processed with SageMaker (for custom models) or AWS AI services (Rekognition, Comprehend, Transcribe).
    Example: Analyzing social media posts (text) for brand sentiment.

  • Semi-Structured Data:
    JSON, XML, or logs (e.g., CloudWatch Logs). Often processed with AWS Glue (ETL) or Athena (SQL queries).
    Example: Parsing IoT device logs to detect anomalies.

Distributions

  • Normal (Gaussian) Distribution:
    Bell-shaped curve (e.g., height, test scores). Used in linear regression, Gaussian Naive Bayes, and anomaly detection (e.g., SageMaker Random Cut Forest).
    Key property: Mean = Median = Mode.

  • Poisson Distribution:
    Models count data (e.g., number of calls to a call center per hour). Used in Poisson regression (e.g., SageMaker built-in algorithms) for rare events.
    Key property: Mean = Variance.

  • Binomial Distribution:
    Models binary outcomes (e.g., success/failure). Used in logistic regression (e.g., SageMaker Linear Learner).

  • Exponential Distribution:
    Models time between events (e.g., customer churn, hardware failures). Used in survival analysis (e.g., SageMaker DeepAR for time-series forecasting).

AWS Services for Data Handling

  • Amazon S3:
    Object storage for all data types (structured, unstructured, semi-structured). Foundation for SageMaker training/inference.
    Best for: Scalable, durable storage with lifecycle policies (e.g., move old data to S3 Glacier).

  • AWS Glue:
    Serverless ETL for structured/semi-structured data. Crawls data (e.g., from RDS or S3) to create a Glue Data Catalog (schema registry).
    Best for: Preparing data for SageMaker or Athena.

  • Amazon Athena:
    Serverless SQL queries on S3 data (structured/semi-structured). Often used to explore data before ML training.
    Best for: Ad-hoc analysis without managing infrastructure.

  • SageMaker Processing:
    Managed service for feature engineering (e.g., scaling, encoding) and data preprocessing (e.g., handling missing values).
    Best for: Running Scikit-learn or Spark jobs at scale.

  • SageMaker Feature Store:
    Centralized repository for ML features (structured data). Supports online (low-latency) and offline (batch) access.
    Best for: Avoiding feature drift in production (e.g., real-time fraud detection).

  • AWS Rekognition:
    Pre-trained computer vision service for unstructured data (images/videos). Detects objects, faces, and text.
    Best for: Quick deployment without training custom models (e.g., moderating user-uploaded images).

  • Amazon Comprehend:
    NLP service for unstructured text (sentiment analysis, entity recognition).
    Best for: Extracting insights from customer reviews or support tickets.

  • Amazon Transcribe:
    Converts audio (unstructured) to text. Used in call center analytics or voice assistants.
    Best for: Preprocessing audio for downstream NLP tasks.


Step-by-Step / Process Flow


Scenario: Building an ML Pipeline for Fraud Detection (Structured Data + Poisson Distribution)

  1. Ingest Data:
  2. Store transaction data (structured) in S3 (e.g., s3://fraud-detection/raw/).
  3. Use Kinesis Data Firehose if data is streaming (e.g., real-time transactions).

  4. Explore & Clean Data:

  5. Query data with Athena to check distributions (e.g., SELECT COUNT(*) FROM transactions GROUP BY hour).
  6. Use SageMaker Processing to:


    • Handle missing values (e.g., impute with median).
    • Encode categorical features (e.g., merchant_category → one-hot encoding).
    • Detect outliers (e.g., transactions > $10,000).
  7. Feature Engineering:

  8. Calculate Poisson-distributed features (e.g., transactions_per_hour for each user).
  9. Store features in SageMaker Feature Store (online + offline) to avoid recomputation.

  10. Train Model:

  11. Use SageMaker XGBoost (handles Poisson regression via objective="count:poisson").
  12. Alternatively, use SageMaker Built-in Algorithms (e.g., Random Cut Forest for anomaly detection).

  13. Deploy & Monitor:

  14. Deploy model to SageMaker Endpoint for real-time inference.
  15. Use CloudWatch to monitor prediction drift (e.g., if transaction patterns change).

Scenario: Analyzing Customer Reviews (Unstructured Data)

  1. Store Data:
  2. Upload reviews (text) to S3 (e.g., s3://reviews/raw/).

  3. Preprocess Text:

  4. Use SageMaker Processing with NLTK or spaCy to:


    • Tokenize text.
    • Remove stopwords.
    • Extract features (e.g., word embeddings with SageMaker BlazingText).
  5. Train Model:

  6. Use SageMaker Hugging Face for fine-tuning a BERT model (sentiment analysis).
  7. Alternatively, use Amazon Comprehend for pre-trained sentiment analysis (no training needed).

  8. Deploy & Infer:

  9. Deploy model to SageMaker Endpoint or use Comprehend’s real-time API.
  10. Store results in DynamoDB for downstream analytics.

Common Mistakes

Mistake Correction
Assuming all data is normally distributed. Check distributions with histograms or Shapiro-Wilk test. Use log transforms for skewed data (e.g., income, transaction amounts).
Using linear regression for count data (e.g., number of calls). Use Poisson regression (e.g., SageMaker XGBoost with objective="count:poisson") or negative binomial regression for overdispersed data.
Ignoring feature scaling for structured data. Scale features (e.g., StandardScaler, MinMaxScaler) for algorithms like SVM or K-means. Tree-based models (e.g., XGBoost) don’t need scaling.
Storing unstructured data in relational databases (e.g., RDS). Use S3 for unstructured data (cheaper, scalable). Use DynamoDB for metadata (e.g., image URLs, timestamps).
Not handling missing values in structured data. Impute with mean/median (for normal data) or mode (for categorical). Use SageMaker Processing to automate this.


Certification Exam Insights

  1. Distribution-Specific Questions:
  2. The exam tests when to use Poisson (count data) vs. Normal (continuous data) vs. Binomial (binary outcomes).
  3. Example: "A model predicts the number of support tickets per hour. Which distribution should you assume?" → Poisson.

  4. Service Selection Traps:

  5. SageMaker Processing vs. AWS Glue:
    • Use SageMaker Processing for ML-specific preprocessing (e.g., feature engineering).
    • Use AWS Glue for ETL (e.g., moving data from RDS to S3).
  6. Rekognition vs. SageMaker Custom Models:


    • Use Rekognition for pre-trained tasks (e.g., face detection).
    • Use SageMaker for custom models (e.g., fine-tuning a ResNet for medical images).
  7. Feature Store vs. S3:

  8. SageMaker Feature Store is for reusable features (e.g., real-time fraud detection).
  9. S3 is for raw/processed data (e.g., training datasets).

  10. Unstructured Data Services:

  11. Comprehend (text) vs. Transcribe (audio) vs. Rekognition (images).
  12. Trick question: "Which service extracts text from PDFs?" → Textract (not Comprehend).

Quick Check Questions

  1. A retail company wants to predict the number of customer returns per day. Which distribution should the model assume?
  2. Answer: Poisson distribution.
  3. Why: Poisson models count data (e.g., events per time period).

  4. A data scientist is building a model to classify customer support tickets as "urgent" or "non-urgent." The data is stored in S3 as JSON files. Which AWS service should they use to preprocess the text before training?

  5. Answer: SageMaker Processing.
  6. Why: SageMaker Processing handles custom preprocessing (e.g., tokenization, stopword removal) for unstructured data.

  7. A healthcare startup is analyzing X-rays (images) to detect pneumonia. They need a solution with minimal ML expertise. Which AWS service should they use?

  8. Answer: Amazon Rekognition (Custom Labels).
  9. Why: Rekognition provides pre-trained models for image analysis without requiring deep ML knowledge. For medical-specific models, they’d need SageMaker.

Last-Minute Cram Sheet

  1. Structured data = tables (CSV, Parquet). Unstructured = text, images, audio.
  2. Normal distribution = bell curve (mean = median). Poisson = count data (mean = variance).
  3. SageMaker Processing = feature engineering. AWS Glue = ETL.
  4. S3 = storage for all data types. DynamoDB = metadata (e.g., image URLs).
  5. Rekognition = images/videos. Comprehend = text. Transcribe = audio.
  6. Feature Store = reusable features (online + offline). S3 = raw/processed data.
  7. ⚠️ Poisson regression is for count data (e.g., events per hour). Linear regression is for continuous data.
  8. ⚠️ Tree-based models (XGBoost, Random Forest) don’t need feature scaling. SVM, K-means do.
  9. Athena = SQL queries on S3. Redshift = data warehousing.
  10. ⚠️ Missing values: Impute with mean/median (normal) or mode (categorical). Never drop without analysis!


ADVERTISEMENT