Regularization
Regularization
where MSE is the Mean Squared Error, 𝜃𝑖 are the model coefficients,
and λ is the regularization parameter.
2. L2 Regularization (Ridge):
▪ In L2 regularization, a penalty term is added to the loss function
proportional to the squared values of the model's coefficients.
▪ The regularization term is the sum of the squared values of the
coefficients multiplied by a regularization parameter.
▪ L2 regularization tends to shrink the coefficients towards zero without
causing them to be exactly zero, promoting a more stable model.
▪ The regularized cost function for linear regression with L2
regularization is given by:
where MSE is the Mean Squared Error, 𝜃𝑖 are the model coefficients,
and λ is the regularization parameter.