skglm.penalties.BlockSCAD#

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

Block Smoothly Clipped Absolute Deviation.

Notes

With `W_j` the j-th row of math:W, the penalty is:

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

Methods

__init__(alpha, gamma)

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_1feat(value, stepsize, j)

Compute the proximal operator of BlockSCAD.

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.