Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Question 1 of 60 · Difference between regression and classification · Easy
What is the primary goal of a regression algorithm?
Not quite. Try another option.
Answer: To predict a continuous numerical value.
Regression models are used for prediction tasks where the output variable is a continuous quantity, such as predicting a price, temperature, or height.
Question 2 of 60 · Difference between regression and classification · Easy
Which of the following problems is an example of regression?
Not quite. Try another option.
Answer: Predicting the price of a house based on its features.
Predicting a house price involves forecasting a continuous numerical value, which is a regression task. The other options are classification tasks, as they involve assigning data to discrete, predefined categories.
Question 3 of 60 · Bias-variance considerations in regression · Easy
A regression model with high bias makes strong assumptions about the data and is likely to...?
Not quite. Try another option.
Answer: Underfit the data.
High bias means the model is too simple and cannot capture the underlying patterns in the data, leading to underfitting. This results in high error on both training and test sets.
Question 4 of 60 · Bias-variance considerations in regression · Easy
A model that performs extremely well on the training data but poorly on unseen test data is said to have...?
Not quite. Try another option.
Answer: High variance.
High variance is a characteristic of a model that is too complex and has learned the training data too well, including its random noise. This phenomenon is known as overfitting.
Question 5 of 60 · Simple Linear Regression · Easy
In Simple Linear Regression, how many independent (predictor) variables are used to predict the dependent (target) variable?
Not quite. Try another option.
Answer: Exactly one.
The term 'simple' in Simple Linear Regression refers to the use of a single independent variable to model a linear relationship with a single dependent variable.
Question 6 of 60 · Simple Linear Regression · Easy
In the Simple Linear Regression equation , what does the term represent?
Not quite. Try another option.
Answer: The slope of the regression line.
is the slope, which represents the change in the dependent variable for a one-unit change in the independent variable .
Question 7 of 60 · Multiple Linear Regression · Easy
What is the main difference between Multiple Linear Regression and Simple Linear Regression?
Not quite. Try another option.
Answer: Multiple Linear Regression uses two or more independent variables, while Simple Linear Regression uses only one.
Multiple Linear Regression extends Simple Linear Regression by allowing the use of multiple predictor variables () to predict a single outcome variable ().
Question 8 of 60 · Multiple Linear Regression · Easy
Which equation represents a Multiple Linear Regression model with two predictor variables, and ?
Not quite. Try another option.
Answer:
This is the standard form for a multiple linear regression model, where is the intercept and and are the coefficients for the independent variables and , respectively.
Question 9 of 60 · Interpretation of coefficients · Easy
In a multiple regression model for predicting salary, the coefficient for the 'Years of Experience' feature is +5000. What is the correct interpretation of this coefficient?
Not quite. Try another option.
Answer: Holding all other features constant, for each additional year of experience, the predicted salary increases by $5000.
Each coefficient in multiple regression represents the change in the dependent variable for a one-unit change in the corresponding independent variable, assuming all other variables are held constant.
Question 10 of 60 · Interpretation of coefficients · Easy
If a regression coefficient for a variable is zero, what does this imply about the model's prediction?
Not quite. Try another option.
Answer: There is no linear relationship between that variable and the target variable.
A coefficient of zero means that a change in the predictor variable has no effect on the predicted outcome in the model, indicating the absence of a linear relationship as captured by the model.
Question 11 of 60 · Regularized Regression models · Easy
Which of the following are two common types of regularized linear regression models?
Not quite. Try another option.
Answer: Ridge and Lasso Regression.
Ridge (L2 regularization) and Lasso (L1 regularization) are the two most well-known techniques for adding a penalty term to the loss function of a linear regression model to prevent overfitting.
Question 12 of 60 · Regularized Regression models · Easy
What is the primary motivation for using regularized regression instead of standard linear regression?
Not quite. Try another option.
Answer: To prevent overfitting by penalizing large coefficients.
Regularization adds a penalty for model complexity (i.e., large coefficient values) to the cost function, which helps to reduce model variance and prevent overfitting the training data.
Question 13 of 60 · Effect of regularization on model complexity · Easy
In Ridge or Lasso regression, what happens to the model's coefficients as the regularization hyperparameter ( or ) is increased?
Not quite. Try another option.
Answer: The magnitudes of the coefficients are pushed towards zero.
The regularization term penalizes the magnitude of the coefficients. A larger hyperparameter ( or ) means a stronger penalty, which forces the optimization process to find smaller coefficient values, thus reducing model complexity.
Question 14 of 60 · Effect of regularization on model complexity · Easy
Which regularization technique has the ability to shrink some coefficients to exactly zero, thus performing automatic feature selection?
Not quite. Try another option.
Answer: Lasso Regression (L1).
The L1 penalty used in Lasso Regression (sum of the absolute values of coefficients) has the property of shrinking less important feature coefficients all the way to zero, effectively removing them from the model.
Question 15 of 60 · Polynomial feature expansion · Easy
Why would a data scientist use polynomial feature expansion with a linear regression model?
Not quite. Try another option.
Answer: To model non-linear relationships between features and the target.
By creating polynomial terms (like , , ), a linear model can fit more complex, non-linear patterns in the data without changing the underlying linear regression algorithm itself.
Question 16 of 60 · Polynomial feature expansion · Easy
If you start with a single feature and apply a polynomial feature expansion of degree 2, what new feature will be added to your model (in addition to the original feature and an intercept)?
Not quite. Try another option.
Answer:
A polynomial expansion of degree 2 for a feature creates a new feature corresponding to raised to the power of 2, which is . The full set of features available to the model would be [1, , ].
Question 17 of 60 · Tree-Based regression models · Easy
Which of the following is a classic example of a tree-based model that can be used for regression?
Not quite. Try another option.
Answer: Decision Tree Regressor.
A Decision Tree can be adapted for regression tasks (becoming a Decision Tree Regressor) by predicting a continuous value in its leaf nodes, typically the average of the target values of the training samples in that leaf.
Question 18 of 60 · Tree-Based regression models · Easy
In a basic regression tree, what value is typically predicted for a new data point that falls into a specific leaf node?
Not quite. Try another option.
Answer: The average of the target values of all training samples in that leaf.
Unlike a classification tree which predicts a class, a regression tree's leaf node predicts a single continuous value, which is usually the mean of the outcomes for the training data that ended up in that leaf.
Question 19 of 60 · Time-series Regression models · Easy
What is the defining characteristic of time-series data?
Not quite. Try another option.
Answer: The data points are ordered chronologically.
Time-series data is a sequence of data points indexed in time order. This temporal dependence is a crucial aspect that must be considered during modeling.
Question 20 of 60 · Time-series Regression models · Easy
In the context of a time-series regression for predicting today's sales (), what would a 'lag-1' feature typically be?
Not quite. Try another option.
Answer: Yesterday's sales ()
A lag variable (or lag feature) is created by using a variable's value from a previous time step as a predictor for the current time step. A 'lag-1' feature is the value from the immediately preceding time step, e.g., using yesterday's sales to predict today's sales.
Question 21 of 60 · Difference between regression and classification · Medium
A data scientist is building a model to predict the exact amount of rainfall (in millimeters) for the next day. A colleague suggests they use Logistic Regression. Why is this suggestion inappropriate for the problem as stated?
Not quite. Try another option.
Answer: Because Logistic Regression is a classification algorithm that predicts a probability or a discrete class, not a continuous value.
The core task is to predict a continuous numerical value (rainfall in mm), which is a regression problem. Logistic Regression is designed for classification tasks, where the goal is to predict a discrete outcome (e.g., 'Rain' or 'No Rain'). Its output is a probability that is mapped to a class, not a continuous quantity.
Question 22 of 60 · Bias-variance considerations in regression · Medium
A regression model has been trained and evaluated. It shows a very low training error (RMSE of 5.5) but a very high validation error (RMSE of 50.2). Which of the following best describes the model's condition and a suitable remedy?
Not quite. Try another option.
Answer: High variance (overfitting); apply L2 regularization or reduce model complexity.
The large gap between a low training error and a high validation error is a classic sign of high variance, also known as overfitting. The model has learned the training data's noise instead of the underlying pattern. To remedy this, one can introduce regularization (like L2/Ridge) to penalize large coefficients or simplify the model (e.g., use fewer features or a less complex algorithm).
Question 23 of 60 · Simple Linear Regression · Medium
You have built a simple linear regression model to predict house prices based on square footage. The model's R-squared () value is 0.65. How should this value be interpreted?
Not quite. Try another option.
Answer: 65% of the variability in house prices can be explained by the square footage.
R-squared, or the coefficient of determination, measures the proportion of the variance in the dependent variable (house price) that is predictable from the independent variable(s) (square footage). An of 0.65 means that 65% of the variance in house prices is accounted for by the model.
Question 24 of 60 · Multiple Linear Regression · Medium
In a multiple linear regression model, you notice that the p-values for two features, 'years_of_experience' and 'age', are very high, suggesting they are not statistically significant. However, when you remove either one, the other's p-value becomes very low (significant). What is the most likely cause of this phenomenon?
Not quite. Try another option.
Answer: Multicollinearity between 'years_of_experience' and 'age'.
Multicollinearity occurs when independent variables in a regression model are highly correlated. 'Age' and 'years_of_experience' are likely to be strongly correlated. When both are in the model, they explain the same variance in the target, making it difficult for the model to estimate their individual effects, resulting in high p-values and unstable coefficients. Removing one allows the other to capture that shared effect, making it appear significant.
Question 25 of 60 · Interpretation of coefficients · Medium
A multiple linear regression model is built to predict the 'price' of a used car. The fitted model is: . Where 'age' is in years, 'mileage' is in miles, and 'is_luxury' is a binary variable (1 if luxury, 0 otherwise). What is the correct interpretation of the coefficient for 'age'?
Not quite. Try another option.
Answer: Holding mileage and luxury status constant, for each additional year of age, the car's price is predicted to decrease by $200.
In multiple regression, the coefficient of a variable represents the change in the predicted outcome for a one-unit change in that variable, assuming all other variables in the model are held constant. This 'ceteris paribus' condition is crucial for correct interpretation.
Question 26 of 60 · Regularized Regression models · Medium
You are working on a regression problem with 100 features, and you suspect that many of them are redundant or irrelevant. You want to build a model that automatically performs feature selection. Which regularization technique would be most suitable for this specific goal?
Not quite. Try another option.
Answer: Lasso Regression (L1)
Lasso (Least Absolute Shrinkage and Selection Operator) Regression uses an L1 penalty term (), which has the property of shrinking some feature coefficients to exactly zero. This effectively removes the feature from the model, thus performing automatic feature selection. Ridge regression (L2) shrinks coefficients towards zero but never sets them exactly to zero.
Question 27 of 60 · Effect of regularization on model complexity · Medium
Consider a Ridge regression model. What is the effect of increasing the regularization parameter alpha (or lambda, ) towards infinity ()?
Not quite. Try another option.
Answer: The model coefficients will all be forced towards zero, resulting in a model that only predicts the mean of the target variable.
The Ridge regression cost function is . As becomes very large, the penalty for having non-zero coefficients dominates the cost function. To minimize the cost, the model must shrink the coefficients () to be as close to zero as possible. In the limit, all coefficients become zero, and the model's prediction is simply the intercept, which is the mean of the target variable in a standardized setting.
Question 28 of 60 · Polynomial feature expansion · Medium
A scatter plot of your single feature 'X' against your target 'y' shows a clear U-shaped (parabolic) relationship. You fit a simple linear regression model () and find it has a very high error. What is the most appropriate next step to improve the model?
Not quite. Try another option.
Answer: Create a new feature and fit the model .
The U-shaped relationship indicates a non-linear pattern that a simple linear model cannot capture (high bias). By performing a polynomial feature expansion and adding a quadratic term (), you allow the model to fit a curve (a parabola) to the data. This increases the model's complexity to better match the underlying relationship.
Question 29 of 60 · Tree-Based regression models · Medium
How does a Random Forest Regressor typically improve upon a single, fully-grown Decision Tree Regressor?
Not quite. Try another option.
Answer: It reduces variance by averaging the predictions of many decorrelated trees.
A single, deep decision tree is prone to overfitting, meaning it has high variance. A Random Forest builds multiple decision trees on different bootstrap samples of the data and considers only a random subset of features for each split. By averaging the predictions of these diverse (decorrelated) trees, it significantly reduces the overall variance of the model, leading to better generalization performance.
Question 30 of 60 · Time-series Regression models · Medium
You are modeling monthly sales data and notice a strong seasonal pattern that repeats every 12 months, as well as an upward trend over time. Which of the following models is explicitly designed to handle both trend and seasonality?
SARIMA models are an extension of ARIMA models specifically designed for time series data with a seasonal component. It includes parameters (P, D, Q, m) to model the seasonality in addition to the standard ARIMA parameters (p, d, q) for trend and autocorrelation. While a linear regression with time and dummy variables for months can capture some of this, SARIMA is built from the ground up to handle these complex time-series dynamics.
Question 31 of 60 · Bias-variance considerations in regression · Medium
A data scientist is trying to decide on the degree for a polynomial regression model. They find that a degree-2 polynomial has a validation RMSE of 15. A degree-10 polynomial has a training RMSE of 2 but a validation RMSE of 40. What does the performance of the degree-10 model indicate?
Not quite. Try another option.
Answer: The model has very low bias but very high variance.
The extremely low training RMSE (2) for the degree-10 polynomial suggests it fits the training data almost perfectly, indicating low bias. However, its performance on the validation set is very poor (RMSE of 40), which is much worse than the simpler degree-2 model. This large gap between training and validation performance is a hallmark of high variance (overfitting).
Question 32 of 60 · Multiple Linear Regression · Medium
When building a multiple linear regression model, you add a new feature that is completely uncorrelated with the target variable. What is the likely effect on the model's and Adjusted ?
Not quite. Try another option.
Answer: will slightly increase or stay the same, while Adjusted will likely decrease.
The standard metric can only increase or stay the same when a new feature is added, regardless of its utility, because the model can simply assign it a coefficient of zero if it's useless. Adjusted , however, penalizes the addition of features that do not improve the model more than would be expected by chance. Therefore, adding a useless feature will cause the Adjusted to decrease.
Question 33 of 60 · Simple Linear Regression · Medium
After fitting a simple linear regression model, you create a residual plot (residuals vs. fitted values). You observe that the points form a distinct funnel shape, widening as the fitted values increase. Which assumption of linear regression is most clearly violated?
Not quite. Try another option.
Answer: Homoscedasticity (constant variance of errors)
The assumption of homoscedasticity states that the variance of the residuals should be constant across all levels of the independent variable(s). A funnel shape in the residual plot indicates that the variance of the errors is not constant; it increases (or decreases) as the predicted value changes. This violation is called heteroscedasticity.
Question 34 of 60 · Interpretation of coefficients · Medium
In a regression model predicting employee salary, one of the predictors is 'Department', a categorical feature with three levels: 'Sales', 'HR', and 'Engineering'. 'Sales' is used as the reference category. The fitted model has a coefficient of +15000 for the 'Department_Engineering' dummy variable. What is the correct interpretation?
Not quite. Try another option.
Answer: The predicted salary for an employee in Engineering is, on average, $15,000 higher than for a similar employee in Sales.
When using dummy variables for categorical features, the coefficient of a specific level (e.g., 'Engineering') represents the average difference in the target variable between that level and the reference (or baseline) category ('Sales'), holding all other model variables constant.
Question 35 of 60 · Effect of regularization on model complexity · Medium
A Lasso regression model is trained on a dataset. When the regularization strength is set to a very small, non-zero value, most coefficients are large. As is gradually increased, what is the expected behavior of the model's coefficients?
Not quite. Try another option.
Answer: The magnitudes of all coefficients will shrink, and some will become exactly zero.
This describes the regularization path of a Lasso model. As the penalty term increases, it puts more pressure on the model to have smaller coefficients. The L1 penalty used by Lasso has the unique effect of forcing some coefficients to become precisely zero once the penalty is strong enough, effectively removing them from the model.
Question 36 of 60 · Regularized Regression models · Medium
You have a dataset with highly correlated features. You decide to use a regularized regression model to prevent overfitting and improve stability. Why might Ridge Regression be a better choice than Lasso Regression in this specific scenario?
Not quite. Try another option.
Answer: Ridge tends to shrink the coefficients of correlated features towards each other, keeping all of them, while Lasso might arbitrarily pick one and eliminate the others.
When features are highly correlated, Lasso's behavior can be unstable; it often arbitrarily selects one feature from a group of correlated features and sets the coefficients of the others to zero. Ridge, on the other hand, tends to distribute the coefficient weight among the correlated features, shrinking them together. This can lead to a more stable and sometimes more interpretable model when you believe the correlated features are all relevant.
Question 37 of 60 · Polynomial feature expansion · Medium
What is the primary risk associated with using a very high-degree polynomial (e.g., degree 20) in a polynomial regression model?
Not quite. Try another option.
Answer: The model is very likely to overfit the training data, leading to poor generalization on new data.
A high-degree polynomial creates a very flexible model with high complexity. While it might achieve a very low error on the training set by weaving through the data points, it is likely capturing noise rather than the true underlying function. This results in high variance (overfitting) and poor performance on unseen data.
Question 38 of 60 · Tree-Based regression models · Medium
When a Decision Tree Regressor makes a prediction for a new, unseen data point, how is the prediction value determined?
Not quite. Try another option.
Answer: The new data point is passed down the tree, and the prediction is the average of the target values of all training samples in the leaf node it reaches.
A decision tree works by recursively partitioning the feature space. For a new data point, it follows the splitting rules from the root node down to a terminal (leaf) node. The prediction for any point that falls into that leaf node is simply the mean of the target variable ('y' values) of all the training data points that ended up in that same leaf during training.
Question 39 of 60 · Time-series Regression models · Medium
An analyst is using an Autoregressive model of order p, AR(p), to forecast a time series. What is the fundamental principle of an AR(p) model?
Not quite. Try another option.
Answer: It predicts the future value of the series as a linear combination of its own 'p' most recent past values.
An Autoregressive (AR) model is based on the idea that the current value of a time series is dependent on its own previous values. The 'p' in AR(p) specifies that the model uses the 'p' most recent time steps (lags) as predictors in a linear equation to forecast the next value.
Question 40 of 60 · Difference between regression and classification · Medium
Which pair of evaluation metrics is most appropriate for a regression task versus a binary classification task, respectively?
Not quite. Try another option.
Answer: Root Mean Squared Error (RMSE) and Area Under the ROC Curve (AUC)
Regression models predict continuous values, so their performance is measured by error metrics like RMSE, MAE, or MSE, which quantify the magnitude of the prediction errors. Classification models predict discrete classes, and their performance is often evaluated using metrics like Accuracy, Precision, Recall, F1-score, or AUC, which measure how well the model distinguishes between classes.
Question 41 of 60 · Regularized Regression models · Hard
In a multiple linear regression scenario with two highly correlated predictor variables, and (correlation ), both having a true positive relationship with the target , how would the estimated coefficients and likely behave in a Ridge regression versus a Lasso regression as the regularization strength is increased?
Not quite. Try another option.
Answer: Ridge will shrink both coefficients towards each other and then towards zero. Lasso is likely to arbitrarily drive one coefficient to zero while keeping the other.
Ridge's penalty term () is minimized when the coefficients for correlated variables are close to each other (it 'prefers' to split the predictive power). Thus, it shrinks them together. Lasso's penalty () is indifferent to how the power is split and performs feature selection. Due to the geometry of the constraint, it will often find a solution where one coefficient is pushed to exactly zero, effectively selecting one variable from the correlated group.
Question 42 of 60 · Bias-variance considerations in regression · Hard
You are fitting a polynomial regression model to a dataset where the true underlying relationship is a simple linear function but the data has a high level of irreducible error (high variance noise). You fit two models: a degree-1 polynomial (linear) and a degree-10 polynomial. Which statement most accurately describes the bias and variance of the degree-10 model compared to the degree-1 model?
Not quite. Try another option.
Answer: The degree-10 model will have low bias on the training set but very high variance, leading to poor generalization on a test set.
A high-degree polynomial (degree-10) is a highly flexible model. On the training data, it can fit both the underlying linear trend and the random noise, resulting in low training error and thus low bias with respect to the training set. However, this fitting of noise means the model's parameters will vary wildly with different samples of training data, leading to very high variance. This high variance results in poor performance on unseen test data. The simple degree-1 model would have low variance but slightly higher bias (as it cannot fit the noise perfectly).
Question 43 of 60 · Tree-Based regression models · Hard
A Gradient Boosting Regressor (GBR) and a Random Forest Regressor (RFR) are trained on the same dataset. The GBR is trained with a small learning rate and a large number of estimators, while the RFR is trained with deep, unpruned trees. If both models show signs of overfitting, how does the nature of this overfitting typically differ between the two models?
Not quite. Try another option.
Answer: The GBR's overfitting is primarily due to reducing bias to an extremely low level at the cost of increased variance, while the RFR's overfitting is due to averaging many low-bias, high-variance models where the variance is not reduced enough.
GBR is a sequential, boosting ensemble method that aims to reduce bias by fitting new models to the residuals of previous models. Overfitting in GBR occurs when it starts fitting the noise in the residuals, leading to extremely low bias on the training data but high variance. RFR is a parallel, bagging ensemble method that averages many deep, high-variance, low-bias trees. The averaging reduces variance. Overfitting in RFR occurs when the individual trees are too complex and the averaging process is insufficient to cancel out the variance, often because the trees are too correlated.
Question 44 of 60 · Interpretation of coefficients · Hard
A multiple regression model is used to predict house prices: . The fitted model yields a statistically significant coefficient . How should this coefficient be interpreted?
Not quite. Try another option.
Answer: For every additional year of age, the expected marginal effect of an additional square foot of size on price decreases by $2.5.
The coefficient represents the interaction effect. The marginal effect of Size on Price is the partial derivative of Price with respect to Size, which is . This shows the effect of size is not constant but depends on age. The interpretation of is how this marginal effect changes for a one-unit change in Age. Specifically, for each one-unit increase in Age, the slope of Price with respect to Size changes by .
Question 45 of 60 · Time-series Regression models · Hard
You are building a linear regression model to forecast sales () using advertising spend () as a predictor. After fitting the model , you perform a Durbin-Watson test on the residuals and get a test statistic of 0.35. What is the most critical implication of this result for your model's statistical inference?
Not quite. Try another option.
Answer: The residuals exhibit strong positive autocorrelation, which violates the independence of errors assumption and leads to underestimated standard errors of the coefficients.
The Durbin-Watson statistic tests for first-order autocorrelation in residuals. A value near 2 indicates no autocorrelation. Values approaching 0 indicate strong positive autocorrelation. A value of 0.35 is very close to 0, indicating a severe violation of the OLS assumption of independent errors. A major consequence of positive autocorrelation is that the standard errors of the regression coefficients will be underestimated, leading to overly optimistic (inflated) t-statistics and p-values. This makes coefficients appear more statistically significant than they actually are.
Question 46 of 60 · Effect of regularization on model complexity · Hard
In the context of regularized linear regression (like Ridge or Lasso), how does the concept of "effective degrees of freedom" change as the regularization parameter is increased from 0 to infinity?
Not quite. Try another option.
Answer: It decreases monotonically from (the number of predictors) towards 0.
The effective degrees of freedom of a model measure its complexity. For an unregularized linear model with predictors, the effective degrees of freedom is . As the regularization penalty increases, the coefficients are constrained and shrunk towards zero. This reduces the model's flexibility to fit the data, thus lowering its complexity. As , all coefficients are forced to zero (for a model without an intercept), and the model becomes a null model with 0 effective degrees of freedom. Therefore, the effective degrees of freedom decrease from towards 0 as increases.
Question 47 of 60 · Multiple Linear Regression · Hard
You are building a multiple linear regression model. You include predictors for a person's weight in kilograms () and their weight in pounds (). Assuming no measurement error (), what is the precise mathematical consequence for the Ordinary Least Squares (OLS) estimation process?
Not quite. Try another option.
Answer: The design matrix becomes singular and its inverse does not exist, so no unique solution for the coefficient vector can be found.
This is a case of perfect multicollinearity, where one predictor is a perfect linear combination of another. The OLS solution for the coefficients is given by . When perfect multicollinearity exists, the columns of the design matrix are linearly dependent. This causes the matrix to be singular (or non-invertible), meaning its determinant is zero. As a result, its inverse is not defined, and the OLS procedure fails to find a unique set of coefficients. While some software packages implement a practical workaround (like option C), the fundamental mathematical result is the non-invertibility of .
Question 48 of 60 · Polynomial feature expansion · Hard
Consider a regression problem where you apply a polynomial feature expansion of degree 5 to a single feature . You then train a Ridge regression model on these 5 derived features (). What is the primary effect of a very large regularization parameter on the resulting regression function ?
Not quite. Try another option.
Answer: The function will approximate a constant function (the mean of the target).
Ridge regression minimizes the objective function . As the regularization parameter becomes extremely large, the penalty for non-zero coefficients dominates the RSS term. To minimize this objective, the model must force all slope coefficients () to approach zero. The intercept term, , is typically not regularized. The model that minimizes the RSS with all slope coefficients being zero is a model that predicts the mean of the target variable for all inputs. Therefore, the function will approximate a constant function, where .
Question 49 of 60 · Simple Linear Regression · Hard
According to the Gauss-Markov theorem, the Ordinary Least Squares (OLS) estimator for the coefficients in a simple linear regression model is the Best Linear Unbiased Estimator (BLUE). What does "Best" in this context specifically refer to?
Not quite. Try another option.
Answer: It has the minimum sampling variance among all linear unbiased estimators.
The Gauss-Markov theorem states that under the standard OLS assumptions (linearity, exogeneity, homoscedasticity, and no perfect multicollinearity), the OLS estimator is BLUE. Each word has a specific meaning: "Linear" means it's a linear function of the observed values. "Unbiased" means its expected value is the true population parameter (). "Best" specifically means that it has the lowest sampling variance compared to any other linear unbiased estimator. This implies that OLS estimates are the most precise or reliable in this class of estimators.
Question 50 of 60 · Difference between regression and classification · Hard
You are tasked with modeling the number of customer support tickets received per hour. The target variable is a non-negative integer (0, 1, 2, ...). A colleague suggests using a Poisson regression model. How does this model blur the line between typical regression and classification tasks?
Not quite. Try another option.
Answer: It predicts a continuous rate parameter () for a count distribution, but the ultimate output variable is discrete, sharing characteristics with both regression (predicting a numeric value) and classification (predicting from a set of integer classes).
Standard regression predicts a continuous value (e.g., price, temperature). Standard classification predicts a discrete, categorical label (e.g., cat, dog, bird). A Poisson regression model uses a linear model to predict the logarithm of a continuous, positive real number, the rate parameter (the expected number of events). This prediction of a continuous parameter is a regression-like task. However, this parameter then defines a probability distribution over a discrete, countably infinite set of outcomes (the integers 0, 1, 2, ...). This makes the target variable discrete, which is a characteristic of classification. Therefore, it sits in a gray area, using regression techniques to model a discrete (count) outcome.
Question 51 of 60 · Tree-Based regression models · Hard
When tuning an XGBoost regressor, you observe that decreasing the eta (learning rate) parameter significantly improves the model's performance on a validation set, but only if you also substantially increase the n_estimators parameter. Why is this combined adjustment necessary for improved performance?
Not quite. Try another option.
Answer: A smaller eta makes each tree contribute less to the final prediction, requiring more trees (n_estimators) to reach a good cumulative model. This slower, more gradual learning process is less likely to overfit.
The eta (learning rate) scales the contribution of each new tree added to the ensemble. A small eta (e.g., 0.01) means each tree makes a very small correction to the overall model. This prevents the model from making drastic changes based on any single tree, which helps avoid overfitting. However, since each step is small, many more steps (n_estimators) are required for the model to 'travel' to a good minimum in the loss function. This combination allows for a more robust and fine-tuned model that generalizes better by taking smaller, more careful steps.
Question 52 of 60 · Regularized Regression models · Hard
You are working with a dataset that has a very large number of features (), many of which are highly correlated with each other in groups. You want to perform feature selection, but also want to avoid arbitrarily discarding correlated features that might be collectively predictive. Which regression model is explicitly designed to handle this "grouping effect" among correlated features?
Not quite. Try another option.
Answer: Elastic Net Regression
Elastic Net combines the penalty of Lasso and the penalty of Ridge. The part enables sparse solutions (feature selection). The part encourages correlated features to be selected together, giving them similar coefficient values. This is known as the "grouping effect." Lasso, by itself, tends to arbitrarily select one feature from a correlated group and zero out the others. Ridge will keep all correlated features but won't perform feature selection. PCR handles correlation but by transforming features into uncorrelated components, losing original feature interpretability. Elastic Net is specifically designed for sparse selection within groups of correlated features.
Question 53 of 60 · Bias-variance considerations in regression · Hard
A financial services company is building a regression model to predict the exact dollar amount of a potential loan default. The cost of under-predicting the default amount is extremely high, while the cost of over-predicting is relatively low. Given this asymmetric cost function, what kind of model characteristic should be prioritized during development, even if it harms standard metrics like Mean Squared Error (MSE)?
Not quite. Try another option.
Answer: A model with lower bias and potentially higher variance, as its flexibility is needed to capture extreme high-default events.
Standard metrics like MSE penalize over- and under-predictions equally. The business problem describes an asymmetric cost. High-cost events (large defaults) are often in the tails of the distribution. A high-bias, low-variance model (e.g., a simple linear model) might be stable but could systematically under-predict these extreme values. A more complex, low-bias, high-variance model (e.g., a complex GBT or a well-tuned neural network) is more flexible and has a better chance of capturing these rare but critical high-default events. The priority is to avoid catastrophic under-prediction, which means accepting a more complex model that can produce large predictions, even at the risk of higher variance.
Question 54 of 60 · Interpretation of coefficients · Hard
In a regression model, both the independent variable (e.g., advertising spend) and the dependent variable (e.g., sales) are log-transformed: . The fitted coefficient is . How is this coefficient correctly interpreted in a practical sense?
Not quite. Try another option.
Answer: A 1% increase in is associated with an expected 0.8% increase in .
This is a log-log model, and the coefficient represents the elasticity of with respect to . Mathematically, . This ratio of percentage changes is interpreted as: a 1% change in is associated with a % change in . So, a 1% increase in advertising spend is associated with an expected 0.8% increase in sales. While option D is mathematically literal, it is not the standard, practical interpretation used to convey the business impact.
Question 55 of 60 · Effect of regularization on model complexity · Hard
You are analyzing the coefficient paths of a Lasso regression as the regularization parameter varies. The path plot shows the magnitude of each coefficient as a function of . What critical information for model selection can be derived from the order in which coefficients become non-zero as decreases from a very large value towards zero?
Not quite. Try another option.
Answer: It provides a data-driven ranking of feature importance, as stronger predictors tend to enter the model (become non-zero) at higher levels of regularization.
The Lasso path algorithm (like LARS) effectively builds the model sequentially. As you relax the penalty (decrease ), the algorithm allows coefficients to become non-zero one by one. The feature whose coefficient 'peels off' from zero first is the one that has the strongest correlation with the current residuals. This sequence of entry into the model provides a powerful heuristic for ranking feature importance. Features that can withstand stronger penalties (higher ) before being zeroed out are generally considered more important by the model.
Question 56 of 60 · Multiple Linear Regression · Hard
In a multiple linear regression analysis, what is the key distinction between a high-leverage point and a high-influence outlier?
Not quite. Try another option.
Answer: A high-leverage point has an extreme value for one or more predictor variables (), while a high-influence outlier is a point that, if removed, would cause a large change in the regression model's coefficients. A point can have high leverage without being influential.
Leverage is a measure determined solely by the predictor variables ( values). A point has high leverage if its values are far from the center of the other values. Influence is a measure of how much the model's parameters (e.g., coefficients) change when a point is removed. Influence is a function of both leverage and the size of the point's residual. A point with high leverage can be non-influential if it lies close to the regression line determined by the other points (i.e., it has a small residual). However, a high-leverage point with a large residual will almost always be highly influential.
Question 57 of 60 · Polynomial feature expansion · Hard
You are creating polynomial features of degree 3 from a set of 10 original features. The original features have vastly different scales (e.g., age from 20-60, income from 50,000-200,000). Why is it critically important to scale the original features before applying the polynomial expansion?
Not quite. Try another option.
Answer: To prevent features with large scales from numerically dominating the polynomial terms, which can cause instability in model fitting algorithms and render regularization ineffective for small-scale features.
Consider income () on a scale of and age () on a scale of . The polynomial term will be on the order of , while will be on the order of . When these terms are fed into a linear model, the huge disparity in scale can lead to numerical precision issues. Furthermore, for regularized models like Ridge or Lasso, the single penalty term is applied to all coefficients. The penalty will be dominated by the coefficients of the large-scale features, effectively ignoring the small-scale features. Scaling first (e.g., using StandardScaler) ensures all original and generated polynomial features are on a comparable scale, leading to stable training and fair regularization.
Question 58 of 60 · Time-series Regression models · Hard
You are building an autoregressive model to forecast a time series. You notice the series has a clear upward trend and a strong seasonal pattern. What is the most severe consequence of fitting a standard AR(p) model directly to this non-stationary data without any transformation?
Not quite. Try another option.
Answer: The model will likely produce a spurious regression, where variables appear to have a statistically significant relationship that is driven by the common trend, not a true causal link, leading to unreliable forecasts.
A key assumption for many time-series models, including AR(p), is that the underlying series is stationary (i.e., its statistical properties like mean and variance do not change over time). A series with a trend and seasonality is non-stationary. Fitting a model directly to such data can lead to a spurious regression. The model might find a very high R-squared and seemingly significant coefficients simply because the target () and the lagged features () are all increasing together due to the common trend. This relationship is not real and will break down for out-of-sample forecasting. The standard practice is to first difference the series (and/or take seasonal differences) to make it stationary before fitting the model.
Question 59 of 60 · Tree-Based regression models · Hard
You have trained a Random Forest Regressor on a dataset where the feature X ranges from 0 to 100. The model has learned the relationship well within this range. What value will the trained model most likely predict for a new data point with X = 200?
Not quite. Try another option.
Answer: A value close to the average prediction for the training instances where X was at its maximum observed value (near 100).
Tree-based models, including Random Forests, cannot extrapolate beyond the range of the training data. A prediction is made by averaging the values in the terminal leaves where a new data point falls. For a value of X=200, which is outside the training range of [0, 100], the data point will traverse each tree down a path. At any split on X, since 200 is greater than any split point based on X in the training data, it will always follow the same branch as a data point with the maximum X value from training. It will therefore end up in the same terminal leaves as the training points with the largest X values. The final prediction will be the average of the target values in those leaves, effectively capping the prediction at the level seen at the edge of the training data.
Question 60 of 60 · Regularized Regression models · Hard
The ability of Lasso regression ( penalty) to produce sparse models (i.e., set some coefficients to exactly zero) is often explained by its geometric interpretation. In a two-coefficient case (), what is the key geometric property of the Lasso constraint region () that leads to this sparsity?
Not quite. Try another option.
Answer: The constraint region is a rhombus with sharp corners at the axes. The elliptical contours of the residual sum of squares (RSS) are likely to make their first contact with the constraint region at one of these corners.
The solution to a regularized regression problem is the point where the elliptical contours of the RSS (centered at the OLS solution) first touch the boundary of the constraint region defined by the penalty. For Ridge regression ( penalty), the constraint is a circle (in 2D), a smooth shape. For Lasso ( penalty), the constraint is a rhombus (a diamond shape in 2D). This shape has sharp corners that lie exactly on the axes (e.g., at or ). It is geometrically probable that the expanding RSS ellipse will hit one of these sharp corners before it touches any of the flat sides. A point on a corner means one of the coefficients is exactly zero, thus inducing sparsity.
That's unit 4
Answer a few questions and your score shows up here.
Nearly through. Did unit 4 of CSE274 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 4 of CSE274 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.