Why should we add a λ to the matrix?
1. To reduce the value of the weights ω.
2. Make XTX invertible.
3. Prevent overfitting
Why will XTX become not invertible?
ωLMS=(XTX)−1XTy
1. Data points of X is less than the dimension of ω2. Columns of X are not linear independent. Such as: a column is a duplicate of one of the features, a column is the scaled version of another. Those columns are dependent between each others.
Example: