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
Let's dive in: when you're sorting product reviews, you need words that actually signal the category, not words that show up everywhere. Term Frequency-Inverse Document Frequency boosts terms that are frequent in one review but rare across the whole corpus, so it highlights distinctive words like 'lens' and down-weights common clutter like 'great'.
Full Explanation
The goal in this scenario is to extract terms that are informative and characteristic of specific document classes. Term Frequency-Inverse Document Frequency is a statistical weighting system designed for this purpose. It combines two concepts: term frequency measures how frequently a term occurs in a specific document, and inverse document frequency measures how common or rare a term is across the entire corpus. By multiplying term frequency and inverse document frequency, words that are frequent in a specific document but rare across the general corpus receive a high weight. Common words like 'and' or 'good' appear in almost all reviews, resulting in an inverse document frequency near zero, which neutralizes their impact. This highlights class-specific jargon like 'lens' or 'aperture'. The Continuous Bag-of-Words approach is a Word2Vec architecture that predicts a target word from surrounding context, generating dense semantic embeddings rather than document-specific word weights. One-Hot Encoding creates high-dimensional, binary representations of words with no frequency or importance weighting. 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.