Skip to content

Commit

Permalink
Fixed issues with docstring and removed unnecessary commented lines
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLuiken committed Oct 9, 2023
1 parent f89d04e commit 00dc27c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pyproximal/proximal/RelaxedMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
from pyproximal.proximal.L1 import _current_sigma


def _l2(x, thresh):
r"""scaling.
def _l2(x, alpha):
r"""Scaling operation.
Applies soft thresholding to vector ``x - g``.
Applies the proximal of ``alpha||y - x||_2^2`` which is essentially a scaling operation.
Parameters
----------
x : :obj:`numpy.ndarray`
Vector
thresh : :obj:`float`
Threshold
alpha : :obj:`float`
scaling parameter
Returns
-------
x1 : :obj:`numpy.ndarray`
Tresholded vector
y : :obj:`numpy.ndarray`
proximal of ``alpha||y - x||_2^2``
"""
y = 1 / (1 + 2 * thresh) * x
y = 1 / (1 + 2 * alpha) * x
return y


Expand Down Expand Up @@ -76,8 +76,6 @@ def __init__(self, sigma=1., kappa=1., g=None):
super().__init__(None, False)
self.sigma = sigma
self.kappa = kappa
# self.g = g
# self.gdual = 0 if g is None else g
self.count = 0

def __call__(self, x):
Expand Down

0 comments on commit 00dc27c

Please sign in to comment.