You train a multilayer perceptron on a multiclass dataset where one target class is rare and recall for that class is too low. Changing the MLP architecture doesn’t help. What change is most likely to improve recall quickly?
Choose an answer
Tap an option to check your answer.
Correct answer: Add class weights to the MLP loss function and retrain the model..
Why this is the answer
Adding class weights to the MLP loss function is the most effective and quickest way to improve recall for a rare class. This technique assigns a higher penalty to misclassifications of the underrepresented class, forcing the model to pay more attention to it during training. Collecting more labeled examples is a good long-term solution but is time-consuming and doesn't offer a quick improvement. Replacing the MLP with k-means clustering is inappropriate because k-means is an unsupervised learning algorithm for grouping data, not for multiclass classification with labeled data. Similarly, using an anomaly detection model is incorrect; anomaly detection identifies outliers, not specific rare classes within a multiclass classification problem.
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