skglm.penalties.SCAD#

class skglm.penalties.SCAD(alpha, gamma)[source]#

Smoothly Clipped Absolute Deviation.

Notes

With `x >= 0`:

`"pen"(x) = { (alpha x , if \ \ \ \ \ \ \ \ \ \ x <= alpha), (2 alpha gamma x - x^2 - alpha^2 / 2 (gamma - 1) , if alpha \ \ < x <= alpha gamma), (alpha^2 (gamma + 1) / 2 , if alpha gamma < x ) :}`
`"value" = sum_(j=1)^(n_"features") "pen"(abs(w_j))`
__init__(alpha, gamma)[source]#

Methods

__init__(alpha, gamma)

generalized_support(w)

Return a mask with non-zero coefficients.

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 SCAD penalty.

subdiff_distance(w, grad, ws)

Compute distance of negative gradient to the subdifferential at w.

value(w)

Compute the value of the SCAD penalty at w.