skglm.penalties.LogSumPenalty

class skglm.penalties.LogSumPenalty(alpha, eps)[source]

Log sum penalty.

The penalty value reads

`"value"(w) = sum_(j=1)^(n_"features") log(1 + abs(w_j) / epsilon)`
__init__(alpha, eps)[source]

Methods

__init__(alpha, eps)

derivative(w)

Compute the element-wise derivative.

generalized_support(w)

Return a mask which is True for coefficients in the generalized support.

get_spec()

Specify the numba types of the class attributes.

is_penalized(n_features)

Return a binary mask with the penalized features.

params_to_dict()

Get the parameters to initialize an instance of the class.

prox_1d(value, stepsize, j)

Compute the proximal operator of the log-sum penalty.

subdiff_distance(w, grad, ws)

Compute distance of negative gradient to the subdifferential at w.

value(w)

Compute the value of the log-sum penalty at w.