| { | |
| "title": "Ridge Regression Mastery: 100 MCQs", | |
| "description": "A comprehensive set of multiple-choice questions designed to teach and test your understanding of Ridge Regression, starting from basic concepts to advanced scenario-based problems.", | |
| "questions": [ | |
| { | |
| "id": 1, | |
| "questionText": "What is the main purpose of Ridge Regression?", | |
| "options": [ | |
| "To reduce bias in predictions", | |
| "To prevent overfitting by adding L2 regularization", | |
| "To increase the complexity of the model", | |
| "To reduce the number of features" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge Regression adds L2 regularization to penalize large coefficients, helping prevent overfitting." | |
| }, | |
| { | |
| "id": 2, | |
| "questionText": "Which term is added to the loss function in Ridge Regression?", | |
| "options": [ | |
| "Sum of squared residuals", | |
| "Sum of absolute values of coefficients", | |
| "Sum of squares of coefficients multiplied by alpha", | |
| "Log-likelihood term" | |
| ], | |
| "correctAnswerIndex": 2, | |
| "explanation": "Ridge Regression adds alpha * sum of squared coefficients to the standard squared error loss." | |
| }, | |
| { | |
| "id": 3, | |
| "questionText": "Ridge Regression is a type of:", | |
| "options": [ | |
| "Linear Regression with L1 regularization", | |
| "Linear Regression with L2 regularization", | |
| "Logistic Regression", | |
| "Decision Tree Regression" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge Regression is Linear Regression with L2 regularization to shrink coefficients." | |
| }, | |
| { | |
| "id": 4, | |
| "questionText": "Which problem does Ridge Regression primarily address?", | |
| "options": [ | |
| "Underfitting", | |
| "Overfitting due to multicollinearity", | |
| "Non-linear data", | |
| "Categorical features" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge Regression reduces overfitting when features are highly correlated." | |
| }, | |
| { | |
| "id": 5, | |
| "questionText": "How does Ridge Regression shrink coefficients?", | |
| "options": [ | |
| "By adding noise to data", | |
| "By adding a penalty proportional to the square of coefficients", | |
| "By removing features randomly", | |
| "By using stepwise regression" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "The L2 penalty in Ridge Regression discourages large coefficients." | |
| }, | |
| { | |
| "id": 6, | |
| "questionText": "What happens if alpha=0 in Ridge Regression?", | |
| "options": [ | |
| "It becomes standard Linear Regression", | |
| "It becomes Lasso Regression", | |
| "It ignores the bias term", | |
| "It fails to converge" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "With alpha=0, the L2 penalty is removed, so Ridge Regression is equivalent to Linear Regression." | |
| }, | |
| { | |
| "id": 7, | |
| "questionText": "Ridge Regression is particularly useful when:", | |
| "options": [ | |
| "The dataset has multicollinearity among features", | |
| "The dataset has very few samples", | |
| "There is no noise in data", | |
| "You want sparse coefficients" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge Regression handles multicollinearity by penalizing large correlated coefficients." | |
| }, | |
| { | |
| "id": 8, | |
| "questionText": "Which metric is commonly used to select the optimal alpha in Ridge Regression?", | |
| "options": [ | |
| "R-squared", | |
| "Mean Squared Error on cross-validation", | |
| "Correlation coefficient", | |
| "Number of features selected" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Cross-validation MSE is used to find the alpha that balances bias and variance." | |
| }, | |
| { | |
| "id": 9, | |
| "questionText": "What effect does increasing the alpha parameter have?", | |
| "options": [ | |
| "Increases overfitting", | |
| "Decreases coefficient values and reduces overfitting", | |
| "Increases model complexity", | |
| "Removes features automatically" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Higher alpha increases the penalty on large coefficients, which shrinks them and reduces overfitting." | |
| }, | |
| { | |
| "id": 10, | |
| "questionText": "Why should features be standardized before applying Ridge Regression?", | |
| "options": [ | |
| "To make computation faster", | |
| "To give all features equal importance in regularization", | |
| "To reduce number of samples", | |
| "To convert all values to integers" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Standardization ensures the penalty treats all features fairly, regardless of scale." | |
| }, | |
| { | |
| "id": 11, | |
| "questionText": "Ridge Regression cannot produce sparse models because:", | |
| "options": [ | |
| "It uses L1 penalty", | |
| "It uses L2 penalty which shrinks but does not set coefficients to zero", | |
| "It ignores regularization", | |
| "It only works with one feature" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "L2 penalty reduces coefficient magnitudes but does not eliminate features completely." | |
| }, | |
| { | |
| "id": 12, | |
| "questionText": "Which scenario favors Ridge Regression over Lasso?", | |
| "options": [ | |
| "You want feature selection", | |
| "All features are relevant and correlated", | |
| "You have very few samples", | |
| "Your target variable is categorical" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge is better when all features contribute and are correlated; Lasso performs feature selection." | |
| }, | |
| { | |
| "id": 13, | |
| "questionText": "Which of the following is a loss function of Ridge Regression?", | |
| "options": [ | |
| "Sum of squared errors", | |
| "Sum of squared errors + alpha * sum of squared coefficients", | |
| "Sum of absolute errors", | |
| "Mean absolute percentage error" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge adds the L2 penalty to the usual squared error loss function." | |
| }, | |
| { | |
| "id": 14, | |
| "questionText": "Scenario: Your data has 200 features and 50 samples. Linear Regression overfits. What should you do?", | |
| "options": [ | |
| "Use Ridge Regression with appropriate alpha", | |
| "Use Linear Regression without changes", | |
| "Remove all features", | |
| "Use logistic regression" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Regularization like Ridge helps prevent overfitting when features outnumber samples." | |
| }, | |
| { | |
| "id": 15, | |
| "questionText": "Scenario: Ridge Regression gives large coefficients even after standardization. Likely reason?", | |
| "options": [ | |
| "Alpha is too small", | |
| "Data has no noise", | |
| "Features are uncorrelated", | |
| "Model is perfect" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "A small alpha means the penalty is weak, so coefficients remain large." | |
| }, | |
| { | |
| "id": 16, | |
| "questionText": "Scenario: After increasing alpha, training error increased but test error decreased. This illustrates:", | |
| "options": [ | |
| "Bias-variance tradeoff", | |
| "Overfitting", | |
| "Underfitting", | |
| "Multicollinearity" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Increasing alpha increases bias (higher training error) but reduces variance (lower test error)." | |
| }, | |
| { | |
| "id": 17, | |
| "questionText": "Which Python library provides Ridge Regression?", | |
| "options": [ | |
| "numpy", | |
| "pandas", | |
| "scikit-learn", | |
| "matplotlib" | |
| ], | |
| "correctAnswerIndex": 2, | |
| "explanation": "Scikit-learn provides Ridge regression through sklearn.linear_model.Ridge." | |
| }, | |
| { | |
| "id": 18, | |
| "questionText": "Which parameter in Ridge controls regularization strength?", | |
| "options": [ | |
| "beta", | |
| "lambda", | |
| "alpha", | |
| "gamma" | |
| ], | |
| "correctAnswerIndex": 2, | |
| "explanation": "In scikit-learn's Ridge, alpha sets the L2 penalty strength." | |
| }, | |
| { | |
| "id": 19, | |
| "questionText": "Ridge Regression reduces multicollinearity by:", | |
| "options": [ | |
| "Shrinking correlated coefficients", | |
| "Eliminating features", | |
| "Adding noise", | |
| "Creating polynomial features" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "L2 regularization shrinks correlated coefficients to reduce instability." | |
| }, | |
| { | |
| "id": 20, | |
| "questionText": "Ridge Regression can be used for:", | |
| "options": [ | |
| "Regression only", | |
| "Classification only", | |
| "Clustering", | |
| "Principal Component Analysis" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge is an extension of Linear Regression and is used for regression tasks." | |
| }, | |
| { | |
| "id": 21, | |
| "questionText": "Standardizing features before Ridge is important because:", | |
| "options": [ | |
| "It reduces alpha value automatically", | |
| "It ensures regularization treats all features equally", | |
| "It changes the target variable", | |
| "It creates sparse solutions" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Without standardization, features with larger scales are penalized more than smaller ones." | |
| }, | |
| { | |
| "id": 22, | |
| "questionText": "Scenario: Alpha is set very high. Likely effect on model?", | |
| "options": [ | |
| "Overfitting", | |
| "Underfitting", | |
| "Perfect fit", | |
| "No effect" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Very high alpha over-penalizes coefficients, increasing bias and underfitting the data." | |
| }, | |
| { | |
| "id": 23, | |
| "questionText": "Which type of regularization does Ridge use?", | |
| "options": [ | |
| "L1", | |
| "L2", | |
| "Elastic Net", | |
| "Dropout" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge uses L2 regularization to shrink coefficients." | |
| }, | |
| { | |
| "id": 24, | |
| "questionText": "Scenario: Two features are highly correlated. Ridge Regression will:", | |
| "options": [ | |
| "Randomly select one feature", | |
| "Shrink their coefficients without eliminating either", | |
| "Eliminate both features", | |
| "Increase their coefficients" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge shrinks correlated coefficients but keeps both in the model." | |
| }, | |
| { | |
| "id": 25, | |
| "questionText": "Scenario: Dataset has noisy features. Ridge Regression helps by:", | |
| "options": [ | |
| "Ignoring noise completely", | |
| "Reducing coefficient magnitudes to prevent overfitting", | |
| "Removing noisy features automatically", | |
| "Converting data to categorical" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Regularization reduces sensitivity to noise, helping the model generalize better." | |
| }, | |
| { | |
| "id": 26, | |
| "questionText": "Scenario: You applied Ridge Regression but your test error is still high. What could help?", | |
| "options": [ | |
| "Decrease alpha", | |
| "Increase alpha or try dimensionality reduction", | |
| "Remove the intercept", | |
| "Ignore standardization" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Increasing regularization or using PCA/PLS can help improve generalization when test error is high." | |
| }, | |
| { | |
| "id": 27, | |
| "questionText": "Scenario: Two datasets have the same features, but one has highly correlated inputs. Ridge Regression will:", | |
| "options": [ | |
| "Shrink coefficients more for correlated features", | |
| "Perform the same on both", | |
| "Eliminate correlated features", | |
| "Fail to converge" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge handles multicollinearity by shrinking coefficients of correlated features." | |
| }, | |
| { | |
| "id": 28, | |
| "questionText": "How can you choose the optimal alpha in Ridge Regression?", | |
| "options": [ | |
| "Random guess", | |
| "Cross-validation on a range of alpha values", | |
| "Using R-squared only", | |
| "Using the number of features" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Cross-validation is used to evaluate model performance for different alpha values and select the best one." | |
| }, | |
| { | |
| "id": 29, | |
| "questionText": "Ridge Regression vs Linear Regression: which statement is true?", | |
| "options": [ | |
| "Ridge ignores some features", | |
| "Ridge always has lower training error", | |
| "Ridge adds L2 penalty to reduce coefficient magnitude", | |
| "Ridge cannot handle more features than samples" | |
| ], | |
| "correctAnswerIndex": 2, | |
| "explanation": "The L2 penalty in Ridge helps shrink coefficients to reduce overfitting." | |
| }, | |
| { | |
| "id": 30, | |
| "questionText": "Scenario: You have standardized features and apply Ridge Regression with alpha=0.1. Increasing alpha to 10 will:", | |
| "options": [ | |
| "Increase training error and may decrease test error", | |
| "Decrease both training and test errors", | |
| "Have no effect", | |
| "Eliminate some features automatically" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Higher alpha increases bias (training error) but can reduce variance (improve test error)." | |
| }, | |
| { | |
| "id": 31, | |
| "questionText": "Why is Ridge Regression sensitive to feature scaling?", | |
| "options": [ | |
| "L2 penalty depends on coefficient magnitude, which depends on feature scale", | |
| "It uses absolute values", | |
| "It ignores intercept", | |
| "It only works with integers" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Without scaling, large-scale features are penalized more than small-scale features." | |
| }, | |
| { | |
| "id": 32, | |
| "questionText": "Scenario: You have a polynomial dataset. Ridge Regression helps by:", | |
| "options": [ | |
| "Eliminating polynomial terms", | |
| "Reducing overfitting caused by high-degree terms", | |
| "Making all coefficients equal", | |
| "Removing intercept automatically" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge shrinks coefficients of high-degree polynomial terms, reducing overfitting." | |
| }, | |
| { | |
| "id": 33, | |
| "questionText": "Scenario: Ridge Regression and Lasso applied on same dataset. Lasso gives some zero coefficients while Ridge does not. Why?", | |
| "options": [ | |
| "Ridge uses L1 penalty", | |
| "Ridge uses L2 penalty which shrinks but doesn’t eliminate coefficients", | |
| "Lasso ignores correlated features", | |
| "Ridge ignores alpha" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "L2 penalty in Ridge shrinks coefficients, while L1 penalty in Lasso can set them exactly to zero." | |
| }, | |
| { | |
| "id": 34, | |
| "questionText": "Scenario: Your dataset has features with very different scales. What should you do before Ridge Regression?", | |
| "options": [ | |
| "Normalize or standardize features", | |
| "Leave features as they are", | |
| "Add noise to smaller features", | |
| "Remove largest features" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Standardizing ensures the penalty treats all features equally." | |
| }, | |
| { | |
| "id": 35, | |
| "questionText": "Scenario: You applied Ridge Regression on noisy data. The coefficients are smaller than in Linear Regression. Why?", | |
| "options": [ | |
| "Ridge ignores noise", | |
| "L2 penalty shrinks coefficients to reduce overfitting", | |
| "Noise is removed automatically", | |
| "Training error increases" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Regularization shrinks coefficients, making the model less sensitive to noise." | |
| }, | |
| { | |
| "id": 36, | |
| "questionText": "Scenario: You have highly correlated features and want some coefficients exactly zero. What should you use?", | |
| "options": [ | |
| "Ridge Regression", | |
| "Lasso Regression", | |
| "Linear Regression", | |
| "Polynomial Regression" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Lasso uses L1 penalty which can set some coefficients exactly to zero, performing feature selection." | |
| }, | |
| { | |
| "id": 37, | |
| "questionText": "Scenario: Ridge Regression shows underfitting. What adjustment can help?", | |
| "options": [ | |
| "Decrease alpha", | |
| "Increase alpha", | |
| "Remove standardization", | |
| "Add noise" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Lowering alpha reduces regularization, allowing coefficients to fit data better." | |
| }, | |
| { | |
| "id": 38, | |
| "questionText": "Scenario: Two Ridge models with different alpha are trained. Model A (low alpha) has low training error, high test error. Model B (high alpha) has higher training error, lower test error. This illustrates:", | |
| "options": [ | |
| "Bias-variance tradeoff", | |
| "Underfitting", | |
| "Multicollinearity", | |
| "Polynomial expansion" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Increasing alpha increases bias (higher training error) but reduces variance (better generalization)." | |
| }, | |
| { | |
| "id": 39, | |
| "questionText": "Scenario: Ridge Regression on dataset with 10,000 features. Most features are irrelevant. Which is better?", | |
| "options": [ | |
| "Ridge Regression", | |
| "Lasso Regression", | |
| "Standard Linear Regression", | |
| "Decision Tree" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Lasso can eliminate irrelevant features via L1 penalty, producing sparse coefficients." | |
| }, | |
| { | |
| "id": 40, | |
| "questionText": "Scenario: After Ridge Regression, coefficients of correlated features are close but non-zero. This is expected because:", | |
| "options": [ | |
| "Ridge ignores correlation", | |
| "L2 penalty shrinks correlated coefficients equally", | |
| "L1 penalty would do the same", | |
| "Model is underfitting" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge shrinks coefficients of correlated features similarly, avoiding instability." | |
| }, | |
| { | |
| "id": 41, | |
| "questionText": "Scenario: You want Ridge Regression but with some feature selection. Which method combines L1 and L2 penalties?", | |
| "options": [ | |
| "Lasso", | |
| "Elastic Net", | |
| "Linear Regression", | |
| "Polynomial Regression" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Elastic Net combines L1 (feature selection) and L2 (shrinkage) penalties." | |
| }, | |
| { | |
| "id": 42, | |
| "questionText": "Scenario: Ridge Regression applied without standardization. What can happen?", | |
| "options": [ | |
| "Features with larger scale get larger penalties", | |
| "All coefficients shrink equally", | |
| "Training error drops", | |
| "Alpha becomes irrelevant" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Without scaling, features with larger magnitude are penalized more, biasing the model." | |
| }, | |
| { | |
| "id": 43, | |
| "questionText": "Scenario: Ridge Regression applied to high-degree polynomial features. Main risk:", | |
| "options": [ | |
| "Underfitting", | |
| "Overfitting due to many terms", | |
| "Alpha is too low", | |
| "Features become sparse" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "High-degree polynomial features increase model complexity; Ridge shrinks coefficients to control overfitting." | |
| }, | |
| { | |
| "id": 44, | |
| "questionText": "Scenario: You want to compare Ridge Regression performance with different alpha. Best approach?", | |
| "options": [ | |
| "Single train-test split", | |
| "K-fold cross-validation", | |
| "Use R-squared only", | |
| "Ignore alpha values" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "K-fold CV allows evaluating different alpha values reliably and selecting the optimal one." | |
| }, | |
| { | |
| "id": 45, | |
| "questionText": "Scenario: Ridge Regression model has high training error and high test error. What’s happening?", | |
| "options": [ | |
| "Underfitting due to too high alpha", | |
| "Overfitting", | |
| "Model perfect", | |
| "Features irrelevant" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "High alpha over-penalizes coefficients, increasing bias and underfitting the data." | |
| }, | |
| { | |
| "id": 46, | |
| "questionText": "Scenario: Dataset has multicollinearity. Which regression reduces variance without eliminating features?", | |
| "options": [ | |
| "Ridge Regression", | |
| "Lasso Regression", | |
| "Linear Regression", | |
| "Polynomial Regression" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge reduces coefficient magnitude for correlated features, lowering variance without zeroing coefficients." | |
| }, | |
| { | |
| "id": 47, | |
| "questionText": "Scenario: Ridge Regression on noisy data. Coefficients are smaller than Linear Regression. Why?", | |
| "options": [ | |
| "Noise removed automatically", | |
| "L2 penalty shrinks coefficients", | |
| "Model ignores target variable", | |
| "Alpha is zero" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "L2 penalty makes the model less sensitive to noise by shrinking coefficients." | |
| }, | |
| { | |
| "id": 48, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with features on vastly different scales. Outcome?", | |
| "options": [ | |
| "Some features penalized more than others", | |
| "All coefficients equal", | |
| "Alpha becomes zero", | |
| "Model fails" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Without scaling, large-scale features incur larger penalties than small-scale features." | |
| }, | |
| { | |
| "id": 49, | |
| "questionText": "Scenario: Ridge Regression used for dataset with correlated inputs. What happens to their coefficients?", | |
| "options": [ | |
| "Shrink similarly, remain non-zero", | |
| "Zeroed out automatically", | |
| "Become negative", | |
| "Removed from model" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge shrinks correlated coefficients together without eliminating them." | |
| }, | |
| { | |
| "id": 50, | |
| "questionText": "Scenario: You need Ridge Regression but also want feature selection. Best choice?", | |
| "options": [ | |
| "Increase alpha", | |
| "Use Elastic Net combining L1 and L2", | |
| "Decrease alpha", | |
| "Ignore multicollinearity" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Elastic Net allows both shrinkage (L2) and feature selection (L1)." | |
| }, | |
| { | |
| "id": 51, | |
| "questionText": "Scenario: Ridge Regression is applied to a dataset with 5000 features, most of which are correlated. What is the main advantage?", | |
| "options": [ | |
| "Eliminates irrelevant features", | |
| "Reduces coefficient variance without removing features", | |
| "Always decreases bias to zero", | |
| "Removes noise automatically" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge shrinks correlated feature coefficients to reduce variance, maintaining all features in the model." | |
| }, | |
| { | |
| "id": 52, | |
| "questionText": "Scenario: After Ridge Regression, test error is still high. Possible solution?", | |
| "options": [ | |
| "Increase alpha further", | |
| "Use dimensionality reduction like PCA before Ridge", | |
| "Remove standardization", | |
| "Reduce training samples" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Dimensionality reduction can remove redundant features and improve generalization." | |
| }, | |
| { | |
| "id": 53, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with polynomial features. Observed very high coefficients for high-degree terms. Best approach?", | |
| "options": [ | |
| "Increase alpha", | |
| "Decrease alpha", | |
| "Remove intercept", | |
| "Ignore polynomial terms" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Increasing alpha penalizes large coefficients, controlling overfitting in polynomial terms." | |
| }, | |
| { | |
| "id": 54, | |
| "questionText": "Scenario: Ridge Regression on dataset with noisy inputs and high multicollinearity. Observed stable coefficients. Why?", | |
| "options": [ | |
| "L2 penalty reduces sensitivity to noise and stabilizes correlated coefficients", | |
| "Training error is minimized", | |
| "Alpha is zero", | |
| "Model ignores correlated features" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge shrinks coefficients to stabilize model against noise and multicollinearity." | |
| }, | |
| { | |
| "id": 55, | |
| "questionText": "Scenario: You perform Ridge Regression with alpha=1 and 10-fold cross-validation. Best alpha is found to be 5. Interpretation?", | |
| "options": [ | |
| "Model underfits with alpha=1, alpha=5 improves generalization", | |
| "Model overfits with alpha=5", | |
| "Cross-validation is irrelevant", | |
| "Training error is minimal at alpha=1" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Higher alpha increases bias slightly but reduces variance, improving test performance." | |
| }, | |
| { | |
| "id": 56, | |
| "questionText": "Scenario: Ridge Regression applied to standardized features. Coefficients of two correlated features are nearly equal. This occurs because:", | |
| "options": [ | |
| "Alpha is too high", | |
| "L2 penalty shrinks correlated coefficients similarly", | |
| "Features are independent", | |
| "Standardization is not needed" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge shrinks correlated coefficients together, leading to similar values." | |
| }, | |
| { | |
| "id": 57, | |
| "questionText": "Scenario: You applied Ridge Regression with alpha=0. Ridge behaves like:", | |
| "options": [ | |
| "Lasso Regression", | |
| "Linear Regression", | |
| "Elastic Net", | |
| "Polynomial Regression" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Alpha=0 removes the L2 penalty, reducing Ridge to standard Linear Regression." | |
| }, | |
| { | |
| "id": 58, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with 1000 features, many irrelevant. Which method could improve sparsity?", | |
| "options": [ | |
| "Increase alpha", | |
| "Switch to Lasso or Elastic Net", | |
| "Decrease alpha", | |
| "Use standardization only" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Lasso (L1) or Elastic Net can set irrelevant coefficients to zero, creating sparse models." | |
| }, | |
| { | |
| "id": 59, | |
| "questionText": "Scenario: Ridge Regression used for a dataset with missing values. Best approach?", | |
| "options": [ | |
| "Ridge handles missing automatically", | |
| "Impute missing values before applying Ridge", | |
| "Remove alpha", | |
| "Ignore missing values" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Ridge requires complete data; missing values should be imputed or removed first." | |
| }, | |
| { | |
| "id": 60, | |
| "questionText": "Scenario: Ridge Regression on standardized dataset shows training error slightly higher than Linear Regression but test error lower. Reason?", | |
| "options": [ | |
| "Bias-variance tradeoff: Ridge increased bias slightly but reduced variance", | |
| "Model underfits completely", | |
| "Alpha is zero", | |
| "Data is too small" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Regularization increases bias but reduces variance, improving test performance." | |
| }, | |
| { | |
| "id": 61, | |
| "questionText": "Scenario: Ridge Regression applied with high alpha and low alpha. Observed training and test errors: High alpha → high training, low test; Low alpha → low training, high test. This illustrates:", | |
| "options": [ | |
| "Bias-variance tradeoff", | |
| "Overfitting", | |
| "Multicollinearity", | |
| "Polynomial expansion" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "This is the classic bias-variance tradeoff scenario." | |
| }, | |
| { | |
| "id": 62, | |
| "questionText": "Scenario: Ridge Regression on dataset with categorical variables encoded as one-hot vectors. Main concern?", | |
| "options": [ | |
| "High multicollinearity due to dummy variables", | |
| "Alpha selection irrelevant", | |
| "Scaling not required", | |
| "Target variable changes" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "One-hot encoding can produce correlated dummy features; Ridge helps reduce coefficient variance." | |
| }, | |
| { | |
| "id": 63, | |
| "questionText": "Scenario: Ridge Regression applied on a time-series dataset with lag features. Why standardization is important?", | |
| "options": [ | |
| "Alpha only applies to standardized features", | |
| "Regularization penalizes coefficients fairly only if features are on same scale", | |
| "Intercept is ignored otherwise", | |
| "Time index must be normalized" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "L2 penalty shrinks coefficients fairly only when all features are standardized." | |
| }, | |
| { | |
| "id": 64, | |
| "questionText": "Scenario: Ridge Regression and OLS applied on small dataset with multicollinearity. Observed unstable coefficients with OLS, stable with Ridge. Why?", | |
| "options": [ | |
| "Ridge reduces coefficient variance through regularization", | |
| "Ridge increases training error", | |
| "OLS ignores multicollinearity", | |
| "Alpha is zero" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Regularization stabilizes coefficients for correlated features." | |
| }, | |
| { | |
| "id": 65, | |
| "questionText": "Scenario: Ridge Regression applied after PCA. Advantage?", | |
| "options": [ | |
| "Reduces dimensionality, coefficients shrunk on principal components", | |
| "Eliminates intercept", | |
| "No need for alpha", | |
| "Features become sparse" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "PCA reduces dimensionality; Ridge shrinks coefficients on principal components to control overfitting." | |
| }, | |
| { | |
| "id": 66, | |
| "questionText": "Scenario: Ridge Regression applied with alpha very large. Observed training and test errors both high. Reason?", | |
| "options": [ | |
| "Underfitting due to over-penalization", | |
| "Overfitting", | |
| "Alpha too small", | |
| "Data not standardized" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Excessive alpha causes high bias, leading to underfitting." | |
| }, | |
| { | |
| "id": 67, | |
| "questionText": "Scenario: Ridge Regression applied to polynomial regression with degree 10. Why use Ridge?", | |
| "options": [ | |
| "Prevent overfitting from high-degree polynomial terms", | |
| "Increase training error", | |
| "Eliminate low-degree terms", | |
| "Remove intercept automatically" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge penalizes large coefficients from high-degree terms, reducing overfitting." | |
| }, | |
| { | |
| "id": 68, | |
| "questionText": "Scenario: Ridge Regression applied to features with different units. Observed coefficients of small-scale features larger than large-scale ones. Reason?", | |
| "options": [ | |
| "L2 penalty uneven due to lack of standardization", | |
| "Alpha is zero", | |
| "Model overfits", | |
| "Data too small" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Without standardization, penalty is unfair; features with small scale are penalized less." | |
| }, | |
| { | |
| "id": 69, | |
| "questionText": "Scenario: Ridge Regression applied with cross-validation. Optimal alpha selected minimizes:", | |
| "options": [ | |
| "Training error only", | |
| "Test error on validation folds", | |
| "Number of features", | |
| "Intercept value" | |
| ], | |
| "correctAnswerIndex": 1, | |
| "explanation": "Cross-validation selects alpha that minimizes validation/test error, improving generalization." | |
| }, | |
| { | |
| "id": 70, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with multicollinearity. Coefficients are shrunk but all non-zero. Implication?", | |
| "options": [ | |
| "Variance reduced, all features retained", | |
| "Model overfits", | |
| "Features eliminated automatically", | |
| "Model fails" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge reduces variance without eliminating correlated features." | |
| }, | |
| { | |
| "id": 71, | |
| "questionText": "Scenario: Ridge Regression applied to large-scale dataset. Alpha tuning via grid search. Why important?", | |
| "options": [ | |
| "Different alphas balance bias and variance for optimal performance", | |
| "Alpha irrelevant", | |
| "Alpha only affects training error", | |
| "Regularization unnecessary" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Alpha controls regularization strength; tuning balances bias and variance." | |
| }, | |
| { | |
| "id": 72, | |
| "questionText": "Scenario: Ridge Regression applied with very small alpha. Observed high variance. Why?", | |
| "options": [ | |
| "L2 penalty too weak to control overfitting", | |
| "Alpha too large", | |
| "Data unstandardized", | |
| "Intercept ignored" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Small alpha provides minimal regularization, leaving high-variance coefficients unchecked." | |
| }, | |
| { | |
| "id": 73, | |
| "questionText": "Scenario: Ridge Regression vs Lasso on highly correlated features. Expected result?", | |
| "options": [ | |
| "Ridge shrinks coefficients similarly; Lasso selects one and zeroes others", | |
| "Both eliminate all correlated features", | |
| "Ridge produces sparse solution; Lasso does not", | |
| "Alpha irrelevant" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge keeps all correlated features with smaller coefficients; Lasso may zero some." | |
| }, | |
| { | |
| "id": 74, | |
| "questionText": "Scenario: Ridge Regression applied with alpha=0. Model behaves like:", | |
| "options": [ | |
| "Linear Regression", | |
| "Lasso", | |
| "Elastic Net", | |
| "Polynomial Regression" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Alpha=0 removes L2 penalty, reducing Ridge to standard Linear Regression." | |
| }, | |
| { | |
| "id": 75, | |
| "questionText": "Scenario: Ridge Regression applied to a dataset with 1000 features, some irrelevant. How to reduce irrelevant features?", | |
| "options": [ | |
| "Switch to Lasso or Elastic Net", | |
| "Increase alpha excessively", | |
| "Decrease alpha to zero", | |
| "Ignore standardization" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Lasso or Elastic Net can remove irrelevant features via L1 regularization." | |
| }, | |
| { | |
| "id": 76, | |
| "questionText": "Scenario: Ridge Regression applied on medical dataset with 500 features, many correlated. Goal: predict patient outcome. Best approach?", | |
| "options": [ | |
| "Use Ridge Regression with cross-validated alpha", | |
| "Use standard Linear Regression", | |
| "Use Lasso only", | |
| "Ignore multicollinearity" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge handles correlated features effectively and cross-validation selects optimal alpha." | |
| }, | |
| { | |
| "id": 77, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with outliers. Observation: coefficients not extremely affected. Why?", | |
| "options": [ | |
| "L2 penalty shrinks coefficients, reducing sensitivity to outliers", | |
| "Training error minimized", | |
| "Model ignores target variable", | |
| "Alpha is zero" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Regularization prevents large coefficients, making the model less sensitive to outliers." | |
| }, | |
| { | |
| "id": 78, | |
| "questionText": "Scenario: Ridge Regression applied with alpha very small, results similar to Linear Regression. Interpretation?", | |
| "options": [ | |
| "L2 penalty is too weak to control overfitting", | |
| "Model underfits", | |
| "Coefficients are zero", | |
| "Training error very high" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Small alpha means minimal regularization; Ridge behaves like Linear Regression with potential overfitting." | |
| }, | |
| { | |
| "id": 79, | |
| "questionText": "Scenario: Ridge Regression on dataset with 2000 features, many irrelevant. Test error high. Recommended?", | |
| "options": [ | |
| "Switch to Lasso or Elastic Net", | |
| "Increase alpha excessively", | |
| "Decrease alpha", | |
| "Ignore irrelevant features" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Lasso or Elastic Net can remove irrelevant features, improving generalization." | |
| }, | |
| { | |
| "id": 80, | |
| "questionText": "Scenario: Ridge Regression applied on highly noisy dataset. Observed smaller coefficients than Linear Regression. Why?", | |
| "options": [ | |
| "L2 penalty shrinks coefficients to reduce variance", | |
| "Model ignores noise", | |
| "Training error drops to zero", | |
| "Alpha is zero" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Regularization reduces sensitivity to noise, shrinking coefficients." | |
| }, | |
| { | |
| "id": 81, | |
| "questionText": "Scenario: Ridge Regression applied to polynomial features with high degree. Observation: large coefficients for high-degree terms. Best solution?", | |
| "options": [ | |
| "Increase alpha to penalize large coefficients", | |
| "Decrease alpha", | |
| "Remove intercept", | |
| "Ignore polynomial terms" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Higher alpha controls overfitting from high-degree polynomial terms." | |
| }, | |
| { | |
| "id": 82, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with categorical features encoded as one-hot vectors. Concern?", | |
| "options": [ | |
| "Multicollinearity due to dummy variables", | |
| "Alpha irrelevant", | |
| "Scaling not required", | |
| "Target variable changes" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "One-hot encoding creates correlated dummy features; Ridge shrinks their coefficients." | |
| }, | |
| { | |
| "id": 83, | |
| "questionText": "Scenario: Ridge Regression applied to time-series dataset with lag features. Why standardization important?", | |
| "options": [ | |
| "L2 penalty penalizes coefficients fairly only if features are on same scale", | |
| "Intercept ignored otherwise", | |
| "Time index must be normalized", | |
| "Alpha irrelevant" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Standardizing features ensures L2 penalty treats all lag features fairly." | |
| }, | |
| { | |
| "id": 84, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with missing values. Action required?", | |
| "options": [ | |
| "Impute missing values before applying Ridge", | |
| "Remove alpha", | |
| "Ignore missing values", | |
| "L2 penalty handles missing automatically" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge requires complete data; missing values must be imputed first." | |
| }, | |
| { | |
| "id": 85, | |
| "questionText": "Scenario: Ridge Regression with very high alpha. Observed high training and test errors. Reason?", | |
| "options": [ | |
| "Underfitting due to over-penalization", | |
| "Overfitting", | |
| "Alpha too small", | |
| "Data not standardized" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Excessive alpha increases bias, causing underfitting." | |
| }, | |
| { | |
| "id": 86, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with highly correlated features. Coefficients shrunk but non-zero. Implication?", | |
| "options": [ | |
| "Variance reduced, features retained", | |
| "Overfitting", | |
| "Features eliminated", | |
| "Model fails" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge reduces variance without removing correlated features." | |
| }, | |
| { | |
| "id": 87, | |
| "questionText": "Scenario: Ridge Regression applied on large-scale dataset. Why tune alpha via grid search?", | |
| "options": [ | |
| "Alpha balances bias-variance tradeoff for optimal performance", | |
| "Alpha irrelevant", | |
| "Alpha only affects training error", | |
| "Regularization unnecessary" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Grid search finds alpha that provides the best tradeoff between bias and variance." | |
| }, | |
| { | |
| "id": 88, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with polynomial features. High-degree terms dominate coefficients. Solution?", | |
| "options": [ | |
| "Increase alpha to control large coefficients", | |
| "Decrease alpha", | |
| "Remove polynomial terms", | |
| "Ignore coefficients" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Higher alpha penalizes large coefficients, reducing overfitting." | |
| }, | |
| { | |
| "id": 89, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with features in different units. Observation: large coefficients for small-scale features. Reason?", | |
| "options": [ | |
| "L2 penalty uneven due to lack of standardization", | |
| "Alpha too high", | |
| "Data uncorrelated", | |
| "Training error minimal" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Without standardization, small-scale features are penalized less, leading to larger coefficients." | |
| }, | |
| { | |
| "id": 90, | |
| "questionText": "Scenario: Ridge Regression applied with k-fold cross-validation. Optimal alpha minimizes:", | |
| "options": [ | |
| "Validation/test error", | |
| "Training error", | |
| "Number of features", | |
| "Intercept value" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Cross-validation selects alpha that minimizes test error for better generalization." | |
| }, | |
| { | |
| "id": 91, | |
| "questionText": "Scenario: Ridge Regression applied with very small alpha. Observed high variance. Reason?", | |
| "options": [ | |
| "L2 penalty too weak to control overfitting", | |
| "Alpha too large", | |
| "Data unstandardized", | |
| "Intercept ignored" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Minimal regularization leaves coefficients unchecked, causing high variance." | |
| }, | |
| { | |
| "id": 92, | |
| "questionText": "Scenario: Ridge Regression applied alongside Lasso on same dataset. Expected difference?", | |
| "options": [ | |
| "Ridge shrinks coefficients; Lasso may zero some", | |
| "Both produce sparse solutions", | |
| "Ridge eliminates features; Lasso does not", | |
| "Alpha irrelevant" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge keeps all coefficients small but non-zero; Lasso can perform feature selection." | |
| }, | |
| { | |
| "id": 93, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with irrelevant features. Test error high. Solution?", | |
| "options": [ | |
| "Switch to Lasso or Elastic Net", | |
| "Increase alpha excessively", | |
| "Decrease alpha", | |
| "Ignore irrelevant features" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Lasso or Elastic Net can remove irrelevant features to improve performance." | |
| }, | |
| { | |
| "id": 94, | |
| "questionText": "Scenario: Ridge Regression applied with standardized features. Coefficients for correlated features similar. Reason?", | |
| "options": [ | |
| "L2 penalty shrinks correlated coefficients similarly", | |
| "Alpha too low", | |
| "Features independent", | |
| "Data too small" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge shrinks correlated coefficients together, producing similar values." | |
| }, | |
| { | |
| "id": 95, | |
| "questionText": "Scenario: Ridge Regression applied to dataset with noisy features. Coefficients smaller than Linear Regression. Why?", | |
| "options": [ | |
| "Regularization reduces sensitivity to noise", | |
| "Training error minimized", | |
| "Alpha zero", | |
| "Noise ignored" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "L2 penalty shrinks coefficients, making model less sensitive to noise." | |
| }, | |
| { | |
| "id": 96, | |
| "questionText": "Scenario: Ridge Regression applied to polynomial regression of degree 12. High-degree terms produce large coefficients. Solution?", | |
| "options": [ | |
| "Increase alpha", | |
| "Decrease alpha", | |
| "Remove intercept", | |
| "Ignore coefficients" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Higher alpha controls overfitting by shrinking large coefficients from high-degree terms." | |
| }, | |
| { | |
| "id": 97, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with one-hot encoded features. Concern?", | |
| "options": [ | |
| "Multicollinearity due to dummy variables", | |
| "Alpha irrelevant", | |
| "Scaling not needed", | |
| "Intercept ignored" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "One-hot encoding creates correlated dummy variables; Ridge shrinks their coefficients." | |
| }, | |
| { | |
| "id": 98, | |
| "questionText": "Scenario: Ridge Regression applied on dataset with missing values. Action required?", | |
| "options": [ | |
| "Impute missing values first", | |
| "Ignore missing values", | |
| "Remove alpha", | |
| "L2 penalty handles missing automatically" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Ridge requires complete data; missing values must be imputed or removed." | |
| }, | |
| { | |
| "id": 99, | |
| "questionText": "Scenario: Ridge Regression applied with cross-validation. Selected alpha minimizes:", | |
| "options": [ | |
| "Validation/test error", | |
| "Training error only", | |
| "Number of features", | |
| "Intercept value" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Cross-validation selects alpha that minimizes validation error for optimal generalization." | |
| }, | |
| { | |
| "id": 100, | |
| "questionText": "Scenario: Ridge Regression applied to real-world dataset with high multicollinearity, noisy features, and high-dimensionality. Best approach?", | |
| "options": [ | |
| "Standardize features, tune alpha via cross-validation, consider Elastic Net if feature selection needed", | |
| "Use Linear Regression", | |
| "Ignore alpha", | |
| "Remove L2 penalty" | |
| ], | |
| "correctAnswerIndex": 0, | |
| "explanation": "Standardization and cross-validated Ridge handle noise and multicollinearity; Elastic Net adds feature selection." | |
| } | |
| ] | |
| } | |