Supervised Learning Models Flashcards
7 cards from real Data Science practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Supervised Learning Models flashcards as text
Which activation function is commonly used in hidden layers to avoid vanishing gradients?
Answer: ReLU
ReLU keeps positive gradients constant, mitigating the vanishing gradient problem.
What does the softmax function produce in a multiclass classifier?
Answer: A probability distribution over classes
Softmax normalizes outputs into probabilities that sum to one across all classes.
When would you prefer mean absolute error over mean squared error?
Answer: When you want robustness to outliers
MAE treats all errors linearly, making it less sensitive to large outliers than MSE.
What is the purpose of a confusion matrix?
Answer: Summarize correct and incorrect predictions by class
A confusion matrix tabulates true/false positives and negatives for each class.
Which scenario most likely indicates overfitting?
Answer: High training accuracy but low test accuracy
Overfitting shows strong training performance that fails to generalize to test data.
What does hyperparameter tuning via grid search do?
Answer: Exhaustively evaluates combinations of preset parameter values
Grid search tries every combination in a defined parameter grid to find the best configuration.
Why might you use stratified sampling when splitting data?
Answer: To preserve class proportions across train and test sets
Stratified sampling keeps the class distribution consistent between splits, important for imbalanced data.