Reputation: 149
L1 Regularization adds a penalty term to the cost function to limit the size of the weights. Do I understand correctly that this penalized cost function is only used in the optimization step and not to calculate the loss of the model? E.g. to calculate the loss of the model in the validation set the not-penalized loss function is to be used ?
Upvotes: 1
Views: 221
Reputation: 46
Yes, you are right. Loss function measures the difference of model prediction with the target value. Penalty term is used to prevent from over-fitting.
Upvotes: 0