0
0
NLPml~20 mins

Model selection for tasks in NLP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Model Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Model Choice
intermediate
2:00remaining
Choosing the best model for sentiment analysis

You want to build a model that classifies movie reviews as positive or negative. Which model is the best choice for this binary text classification task?

AA convolutional neural network (CNN) designed for image recognition
BA recurrent neural network (RNN) or transformer-based model trained on text data
CA k-means clustering algorithm
DA linear regression model
Attempts:
2 left
💡 Hint

Think about models that understand sequences of words and context in text.

Metrics
intermediate
2:00remaining
Evaluating a multi-class text classifier

You trained a model to classify news articles into 5 categories. Which metric is best to evaluate overall model performance?

AAccuracy
BMean Squared Error (MSE)
CBLEU score
DPerplexity
Attempts:
2 left
💡 Hint

Consider a metric that measures correct predictions over total predictions for classification.

🧠 Conceptual
advanced
2:30remaining
Selecting a model for named entity recognition (NER)

You need to identify names of people, places, and organizations in text. Which model type is most suitable for this sequence labeling task?

ATransformer-based model with token classification head
BFeedforward neural network with bag-of-words input
CK-nearest neighbors classifier
DAutoencoder for dimensionality reduction
Attempts:
2 left
💡 Hint

NER requires understanding each word's role in context within a sentence.

🔧 Debug
advanced
2:30remaining
Why does this text classification model perform poorly?

You trained a text classifier using a bag-of-words model and logistic regression. The accuracy is very low on test data. What is the most likely reason?

AThe model is overfitting because it has too many parameters
BThe dataset is too large for logistic regression to train
CBag-of-words ignores word order and context, limiting performance on complex language tasks
DLogistic regression cannot handle binary classification
Attempts:
2 left
💡 Hint

Think about what information bag-of-words loses about the text.

Hyperparameter
expert
3:00remaining
Choosing hyperparameters for fine-tuning a transformer model

You are fine-tuning a pre-trained transformer model on a small labeled dataset for text classification. Which hyperparameter setting is most important to avoid overfitting?

ATrain for many epochs without early stopping
BUse a very high learning rate (e.g., 0.1) to speed up training
CFreeze all layers and only train the final classification layer
DUse a small batch size and apply dropout regularization
Attempts:
2 left
💡 Hint

Think about techniques that reduce overfitting when data is limited.