GroupL2SoftThresholding#
- class mrinufft.trajectories.projection.GroupL2SoftThresholding(shape: tuple[int, ...], alphas: ndarray[tuple[int, ...], dtype[_ScalarType_co]])[source]#
Bases:
ProxOperatorGroup L2 Soft Thresholding (Shrinkage) Operator.
This operator applies a soft-thresholding on the L2 norm of vectors grouped along the last dimension. It is effectively the proximal operator of the Group Lasso (L2,1) penalty.
The logic follows: \(y = x * max(0, ||x|| - alpha) / ||x||\)
- Parameters:
Methods
__init__affine_additionAffine addition
chainChain
gradGradient of the Moreau envelope of the function.
postcompositionPostcomposition
precompositionPrecomposition
Apply the Group L2 Soft Thresholding.
proxdualAttributes
HAdjoint operator - swaps prox and proxdual
- __call__(x: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) bool[source]#
Evaluate the regularization function value (L2,1 norm weighted by alphas).
Note: This returns the penalty value, not a boolean check.
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.- Return type:
- prox(x: ndarray[tuple[int, ...], dtype[_ScalarType_co]], tau: float, eps: float = 1e-10) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]#
Apply the Group L2 Soft Thresholding.
y = x * ( ||x||_2 - (alphas * tau) )_+ / ||x||_2
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.