The equation for ridge regression is as follows:
In the preceding equation, the ridge loss function is equal to the ordinary least squares loss function, plus the product of the square of Parameter1 of each feature and alpha.
alpha is a parameter that we can optimize in order to control the amount by which the ridge loss function penalizes the coefficients, in order to prevent overfitting. Obviously, if alpha is equal to 0, the ridge loss function is equal to the ordinary least squares loss function, thereby making no difference to the initial overfit model.
Therefore, optimizing this value of alpha provides the optimal ...