Module 2 Quiz: Regression Techniques
Module 2 Quiz: Regression Techniques
Regularization is useful in conditions where there are many input variables, possibly including irrelevant ones, or when using polynomial features of high degree. Both scenarios can lead to a model with high variance, which fits noise rather than the underlying data distribution, thus regularization helps by penalizing large coefficients to promote simpler models .
Using polynomial features with a high degree can lead to overfitting, as the model may become too complex to generalize well on unseen data. Regularization helps to mitigate this by penalizing the magnitude of the coefficients, thus encouraging simpler models that generalize better .
A very large regularization parameter λ can cause the model to underfit the training data. This happens because the penalty on the size of coefficients is so strong that the model becomes overly simplistic, failing to capture the underlying patterns in the data, leading to poor performance on both training and testing datasets .
Interpreting the output of a logistic regression model as a probability implies that the model predicts the likelihood that a given input belongs to a particular class. The sigmoid function outputs values between 0 and 1, which can be directly treated as the probability of the input instance being in the positive class .
The convexity of the mean squared error loss function ensures that there is a single global minimum, making it easier for the optimization algorithm, such as gradient descent, to find this minimum. This property leads to stable convergence .
When the learning rate is too high, the updates to the parameters are excessively large, potentially causing the cost function to increase instead of decreasing over iterations. This happens because the algorithm overshoots the minimum of the cost function, failing to converge properly .
Normalizing features ensures that all input variables are on the same scale, which helps in accelerating the convergence of the gradient descent algorithm. When features are on vastly different scales, the cost function can become elongated, potentially causing gradient descent to take inefficient paths while searching for the minimum .
Applying regularization to the intercept parameter is typically incorrect because the intercept doesn't contribute to the model complexity in the same way as the weights for the other input variables do. Regularizing it can thus distort the model's bias term and lead to suboptimal fit .
Scaling or normalizing the dummy input variable x=1 is unnecessary and technically incorrect, as it is meant to always equal one and thus acts as a baseline for the intercept term in the model .
In logistic regression, it handles classification problems rather than regression problems. The sigmoid function, which is used in logistic regression, is non-linear, and the output of the model can be interpreted as a probability .