Courseiva
Data Preparation for Machine LearningmediumMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A machine learning engineer is building a pipeline to preprocess text data for a sentiment analysis model. The data consists of customer reviews. The engineer wants to convert the text into numerical features while preserving the semantic meaning of words. Which technique should be used?

⚠ Common exam trap

Many candidates choose TF-IDF (Option B) because it is a common text preprocessing technique, but they overlook the explicit requirement to 'preserve semantic meaning,' which only dense embeddings can achieve.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Word embeddings (e.g., Word2Vec or GloVe)

Word embeddings (like Word2Vec or GloVe) are dense vector representations that capture semantic relationships between words based on their context in a large corpus. For sentiment analysis, preserving semantic meaning (e.g., 'good' and 'excellent' having similar vectors) is critical, and embeddings directly encode this, unlike sparse or count-based methods.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • One-hot encoding of each word

    Why it's wrong here

    One-hot encoding creates sparse vectors without semantic similarity.

  • Bag-of-words with TF-IDF

    Why it's wrong here

    TF-IDF captures term frequency but not semantic meaning.

  • Hashing vectorizer

    Why it's wrong here

    Hashing vectorizer reduces dimensionality but loses semantic information.

  • Word embeddings (e.g., Word2Vec or GloVe)

    Why this is correct

    Word embeddings represent words in dense vector spaces that preserve semantic relationships.

About these practice questions

Courseiva writes every MLA-C01 question from scratch — 835 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.