Quiz: Overfitting and regularization

This quiz covers key concepts related to overfitting and regularization in machine learning, providing a series of questions to test understanding and application of these concepts.

ZoeG2·36 flashcards·36 questions
collegecomputer_scienceai_ml
0
Known
1 / 36
0
Learning
Front

What is overfitting in machine learning?

Tap to flip
Back

Overfitting occurs when a model learns the training data too well, capturing noise and details that do not generalize to new data.

Tap to flip
Got it
Still learning

Quiz(36 questions)

Question 1 of 36

1. What does L1 regularization primarily encourage in a model?

Terms in this Study Set(36)

Overfitting Basics(12)

What is overfitting in machine learning?

Overfitting occurs when a model learns the training data too well, capturing noise and details that do not generalize to new data.

True or False: Overfitting improves model performance on unseen data.

False. Overfitting typically results in poor performance on new data, as the model fails to generalize.

List two signs of overfitting.

- High accuracy on training data - Low accuracy on validation/test data

What happens when a model overfits?

The model becomes overly complex, making predictions based on noise rather than the actual data trends.

Fill in the blank: Overfitting leads to ________ in predictive performance.

decreased accuracy

Compare overfitting and underfitting.

Overfitting: models complex, learns noise. Underfitting: models too simple, misses trends.

What are the implications of overfitting?

Poor model generalization, high variance, and misleading performance metrics.

Describe a simple example of overfitting.

A model that perfectly predicts training data prices, but fails to predict new prices accurately.

What is the relationship between model complexity and overfitting?

Increased model complexity raises the risk of overfitting, as it can learn irrelevant details.

True or False: Regularization can help reduce overfitting.

True. Regularization techniques add constraints to the model, encouraging simpler solutions.

Identify a common consequence of overfitting.

Inability to perform well on unseen data.

What is cross-validation used for?

To assess how well a model generalizes to an independent dataset and detect overfitting.

Regularization Techniques(12)

What is L1 regularization?

L1 regularization adds a penalty equal to the absolute value of the coefficients. This encourages sparsity in the model, effectively reducing the number of features used.

What is L2 regularization?

L2 regularization adds a penalty equal to the square of the coefficients. This helps to shrink the coefficients but generally keeps all features in the model.

True or False: L1 regularization can lead to feature elimination.

True. L1 regularization can set some coefficients to zero, effectively removing those features from the model.

Compare L1 and L2 regularization.

- L1 can eliminate features - L2 shrinks coefficients - L1 results in sparse models - L2 keeps all features

What is dropout in neural networks?

Dropout randomly sets a fraction of the neurons to zero during training, which helps prevent overfitting by forcing the model to learn redundant representations.

Fill in the blank: In dropout, a common rate is ____.

0.5 (50% of neurons are dropped during training to prevent overfitting.)

What does data augmentation help with?

Data augmentation creates artificial data instances by transforming existing data, which helps reduce overfitting by providing more diverse training examples.

Cause → Effect: Using early stopping.

Cause: Monitor validation loss during training. Effect: Stop training when performance starts to degrade, preventing overfitting.

What is weight decay?

Weight decay is a form of L2 regularization where a small value is added to the loss function to penalize large weights, encouraging simpler models.

How does cross-validation help in regularization?

Cross-validation assesses model performance on different data splits, allowing for better tuning of regularization parameters and minimizing overfitting.

What is Elastic Net regularization?

Elastic Net combines L1 and L2 regularization techniques. It is useful when there are many correlated features.

True or False: Regularization always improves model accuracy.

False. Regularization can improve model generalization but may reduce accuracy on training data.

Evaluation Metrics(12)

What is accuracy in model evaluation?

Accuracy is the ratio of correctly predicted instances to total instances. - Formula: Accuracy = \\frac{TP + TN}{TP + TN + FP + FN} - TP: True Positives, TN: True Negatives, FP: False Positives, FN: False Negatives.

True or False: High accuracy always indicates a good model.

False. High accuracy can be misleading, especially in imbalanced datasets where one class dominates.

What does precision measure?

Precision measures the accuracy of positive predictions. It is calculated as: Precision = \\frac{TP}{TP + FP}.

Recall is also known as what?

Recall is also known as Sensitivity or True Positive Rate. It measures the ability to identify all relevant instances.

Fill in the blank: F1 Score is the harmonic mean of ____ and ____.

F1 Score is the harmonic mean of Precision and Recall.

What is the purpose of the ROC curve?

The ROC curve illustrates the trade-off between True Positive Rate and False Positive Rate across different thresholds.

Compare precision and recall.

Precision focuses on the accuracy of positive predictions, while recall focuses on capturing all positive cases.

What is the AUC in ROC?

AUC stands for Area Under the Curve. It summarizes the ROC curve performance; a higher AUC indicates better model performance.

True or False: AUC of 1 indicates a perfect model.

True. An AUC of 1 signifies perfect classification, where all positive and negative instances are correctly identified.

What does the confusion matrix display?

The confusion matrix displays the counts of true positives, true negatives, false positives, and false negatives for a model's predictions.

Cause → Effect: High bias leads to ____.

High bias leads to underfitting, where the model fails to capture the underlying trends of the data.

What is a common issue with using only accuracy as a metric?

Using only accuracy can be problematic in imbalanced datasets, as it may not reflect the model's performance effectively.

Questions in this Study Set(36)

1. What does L1 regularization primarily encourage in a model?

A.Sparsity in feature selection
B.Uniform distribution of coefficients
C.Increased model complexity
D.High polynomial degree

2. What does a high recall score indicate in a model's performance?

A.The model identifies most relevant instances.
B.The model has a high rate of false positives.
C.The model's predictions are mostly incorrect.
D.The model fails to detect negative instances.

3. What does it mean when a model is overfitting?

A.It learns the training data too well, including noise.
B.It has too few parameters to capture data trends.
C.It performs identically on training and test data.
D.It generalizes effectively to unseen data.

4. Which of the following best describes L2 regularization?

A.It squares the coefficients to penalize large values.
B.It eliminates features from the model.
C.It applies no penalty to the coefficients.
D.It only works with linear models.

5. Which metric is primarily concerned with the correctness of positive predictions?

A.Precision
B.Recall
C.F1 Score
D.Specificity

6. Which of the following is NOT a sign of overfitting?

A.High accuracy on training data
B.High accuracy on validation data
C.Low accuracy on test data
D.Large difference between training and test accuracy

7. True or False: Dropout can improve model robustness during training.

A.True
B.False
C.Only in shallow networks
D.Only if used with L1 regularization

8. Fill in the blank: The F1 Score balances ____ and ____.

A.Precision; Recall
B.Accuracy; AUC
C.True Positives; True Negatives
D.Sensitivity; Specificity

9. What is a common consequence of overfitting?

A.Increased accuracy on unseen data
B.Consistent performance across all datasets
C.Poor performance on new data
D.Simplicity of the model

10. Which regularization technique combines L1 and L2 penalties?

A.Elastic Net
B.Ridge Regression
C.Lasso Regression
D.Dropout

11. What is indicated by an AUC value of 0.5?

A.The model performs no better than random guessing.
B.The model classifies all instances perfectly.
C.The model has high precision but low recall.
D.The model is very biased.

12. Which technique can help mitigate overfitting?

A.Adding more features to the model
B.Using regularization methods
C.Increasing the learning rate
D.Decreasing the size of the training dataset

13. In the context of regularization, what is the purpose of early stopping?

A.To terminate training when validation performance worsens
B.To increase the learning rate
C.To expand the dataset
D.To decrease the number of epochs

14. True or False: A confusion matrix can show how many false negatives a model has.

A.True
B.False
C.Not applicable
D.Only for binary classification

15. True or False: A model is considered overfitted if it performs poorly on training data.

A.True
B.False
C.Only if it performs well on test data
D.Only if it has high complexity

16. What is the effect of using a high dropout rate?

A.Increased risk of underfitting
B.Better model convergence
C.Less data augmentation
D.Higher model complexity

17. Which of the following metrics would be most useful for a class-imbalanced dataset?

A.F1 Score
B.Accuracy
C.ROC Curve
D.Mean Squared Error

18. What happens when you increase model complexity?

A.It always improves model performance.
B.It decreases the risk of overfitting.
C.It can increase the risk of overfitting.
D.It guarantees better prediction accuracy.

19. Which of the following is NOT a consequence of L2 regularization?

A.Elimination of features
B.Reduction of model complexity
C.Smooth coefficient distribution
D.Penalty on large weights

20. What is the primary purpose of the ROC curve?

A.To show the trade-off between sensitivity and specificity.
B.To calculate the model's accuracy.
C.To identify the number of false positives.
D.To compare model architectures.

21. In which situation might you observe overfitting?

A.When the model learns the general trend of the data.
B.When the model has excessively few parameters.
C.When a complex model is trained on a small dataset.
D.When a model is trained on a large and varied dataset.

22. What does weight decay do in the context of training a neural network?

A.Penalizes large weights to discourage complexity
B.Increases the learning rate over time
C.Eliminates features from the dataset
D.Saves weights after each epoch

23. Which of the following statements is true regarding high accuracy?

A.High accuracy does not always indicate a good model.
B.High accuracy guarantees no false positives.
C.High accuracy is the only metric that matters.
D.High accuracy means the model is valid.

24. Which of the following describes underfitting?

A.The model learns the training data perfectly.
B.The model fails to capture the underlying trend.
C.The model performs well on both training and test data.
D.The model is overly complex.

25. Which technique helps to better assess model performance and tune regularization?

A.Cross-validation
B.Data augmentation
C.Grid search
D.Early stopping

26. Which metric measures the proportion of actual positive cases that were correctly predicted?

A.Recall
B.Precision
C.F1 Score
D.Specificity

27. What role does cross-validation play in identifying overfitting?

A.It helps to measure training data accuracy only.
B.It provides a way to improve model complexity.
C.It assesses how well the model generalizes to new data.
D.It eliminates the need for a test dataset.

28. Fill in the blank: In dropout, a common rate is ____.

A.0.5
B.0.1
C.0.9
D.0.75

29. What would a low precision score suggest about a model's predictions?

A.The model has a high rate of false positives.
B.The model captures all positive instances.
C.The model is very accurate overall.
D.The model fails to predict any negatives.

30. Fill in the blank: Overfitting typically results in ________ on new data.

A.decreased accuracy
B.increased accuracy
C.perfect predictions
D.no change in performance

31. True or False: Regularization techniques can negatively affect training accuracy.

A.True
B.False
C.Only in L1 regularization
D.Only in dropout

32. What does the term 'specificity' refer to in model evaluation?

A.The ability to correctly identify negative cases.
B.The proportion of true positives in all predictions.
C.The accuracy of the model overall.
D.The trade-off between precision and recall.

33. Which scenario is an example of overfitting?

A.A model predicts house prices accurately within the training set.
B.A model struggles to learn from any training data.
C.A model generalizes well to new house prices.
D.A model fails to recognize trends in diverse datasets.

34. What does data augmentation do in the context of regularization?

A.Creates additional training data through transformations
B.Reduces the number of features in the dataset
C.Eliminates redundant data points
D.Only applies to image data

35. Comparing precision to recall, which is the main focus of precision?

A.The correctness of the predicted positive instances.
B.The ability to capture all true positive cases.
C.The overall accuracy across all predictions.
D.The number of instances classified as negative.

36. True or False: Regularization techniques can simplify a model to reduce overfitting.

A.True
B.False
C.Only for neural networks
D.Only for linear models

Related Study Sets

Create Your Own Study Set

Upload a PDF, paste your notes, or describe a topic – AI generates flashcards, quizzes and more in seconds.