A developer is building a system to categorize e-commerce product reviews. To improve classification accuracy, they need to identify specific, high-value words that characterize certain product categories (e.g., "lens" for cameras) while ignoring globally common words that appear across all reviews (e.g., "great", "item"). Which text representation model should they choose?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let's dive in: if you're analyzing product reviews, words like "the", "good", or "product" are going to show up in almost every single review. If you use a simple Bag-of-Words model, it's just going to count those words and conclude they are the most important words because they have the highest count. But they tell you absolutely nothing about the actual product! We need a method that can spot the unique words—like "lens" or "shutter" for cameras—and ignore the common clutter. That's exactly what TF-IDF does. It counts how often a word shows up in a single review, but then it penalizes that word if it shows up in reviews all over the place. That leaves you with a list of highly specific, distinguishing words. Option B is your winner.
Full explanation below image
Full Explanation
The goal in this scenario is to extract terms that are informative and characteristic of specific document classes. - TF-IDF (Term Frequency-Inverse Document Frequency) is a statistical weighting system designed for this purpose. It combines two concepts: 1. Term Frequency (TF): Measures how frequently a term occurs in a specific document. 2. Inverse Document Frequency (IDF): Measures how common or rare a term is across the entire corpus. By multiplying TF and IDF, words that are frequent in a specific document (high TF) but rare across the general corpus (high IDF) receive a high weight. Common words like "and" or "good" appear in almost all reviews, resulting in an IDF near zero, which neutralizes their impact. This highlights class-specific jargon like "lens" or "aperture". - Option A (CBOW) is a Word2Vec architecture that predicts a target word from surrounding context, generating dense semantic embeddings rather than document-specific word weights. - Option C (One-Hot Encoding) creates high-dimensional, binary representations of words with no frequency or importance weighting. - Option D (Bag-of-Words) counts raw word frequencies. While it tracks terms, it does not down-weight globally frequent terms, meaning common words will dominate the feature vectors.