Loss, constraints and regularizers

These are some convenience functions that implement common losses, constraints and regularizers.

Smooth loss functions:

copt.loss.LogLoss(A, b[, alpha])

Logistic loss function.

copt.loss.SquareLoss(A, b[, alpha])

Squared loss.

copt.loss.HuberLoss(A, b[, alpha, delta])

Huber loss

Non-smooth terms accessed through their proximal operator

copt.penalty.L1Norm(alpha)

L1 norm, that is, the sum of absolute values:

copt.penalty.GroupL1(alpha, groups)

Group Lasso penalty

copt.penalty.TraceNorm(alpha, shape)

Trace (aka nuclear) norm, sum of singular values

copt.penalty.FusedLasso(alpha)

Fused Lasso penalty

copt.penalty.TotalVariation2D(alpha, shape)

2-dimensional Total Variation pseudo-norm

Constraints can be incorporated in a similar way through

copt.constraint.L1Ball(alpha)

Indicator function over the L1 ball

copt.constraint.TraceBall(alpha, shape)

Projection onto the trace (aka nuclear) norm, sum of singular values