Regularization - Cost Function
Intuition:
Make features contribution to cost function very large. This means their θ will be small hence reduce their contribution/magnitude/valueResult: simpler hypothesis and less prone to overfitting
Since we don't know which features to reduce, we add a regularization term to the end of cost function. λ, the regularization parameter, will try to balance between fitting the data and reducing overfitting
minθ 12m [∑mi=1(hθ(x(i))−y(i))2+λ ∑nj=1θ2j]
Resources:
Comments
Post a Comment