A data scientist used the SageMaker Neural Topic Model (NTM) to recommend tags for blog posts stored as JSON in S3. The model suggests stopwords like "a," "an," and "the," and sometimes rare but valid words. The team wants to keep the rare words but ensure stopwords are not recommended. What should the data scientist do?
Choose an answer
Tap an option to check your answer.
Correct answer: Remove stopwords from the blog text using scikit-learn's CountVectorizer and replace the data in S3 with the vectorized results..
Why this is the answer
The correct solution involves preprocessing the text data to remove stopwords before training the NTM model. scikit-learn's CountVectorizer offers a stopwords parameter that can be set to 'english' or a custom list, effectively removing common words like "a," "an," and "the" during tokenization. Replacing the S3 data with these vectorized results ensures the NTM model trains on more meaningful terms. Calling Amazon Comprehend entity recognition is incorrect because it focuses on identifying entities (people, places, organizations) rather than removing general stopwords. Running PCA is a dimensionality reduction technique, not a method for text preprocessing or stopword removal. Using the SageMaker built-in Object Detection algorithm is entirely inappropriate as it is designed for image analysis, not text processing or topic modeling.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed