Adds regularization to the loss value
Adds regularization to the loss value
The loss to be updated
The weights used to update the loss
The regularization parameter to be applied
Updated loss
Calculates the new weights based on the gradient and regularization penalty
Calculates the new weights based on the gradient and regularization penalty
Weights are updated using the gradient descent step w - learningRate * gradient
with w
being the weight vector.
The weights to be updated
The gradient used to update the weights
The regularization parameter to be applied
The effective step size for this iteration
Updated weights
Represents a type of regularization penalty
Regularization penalties are used to restrict the optimization problem to solutions with certain desirable characteristics, such as sparsity for the L1 penalty, or penalizing large weights for the L2 penalty.
The regularization term,
R(w)
is added to the objective function,f(w) = L(w) + lambda*R(w)
where lambda is the regularization parameter used to tune the amount of regularization applied.