Skip to content

Commit 00dc27c

Browse files
committed
Fixed issues with docstring and removed unnecessary commented lines
1 parent f89d04e commit 00dc27c

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

pyproximal/proximal/RelaxedMS.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
from pyproximal.proximal.L1 import _current_sigma
66

77

8-
def _l2(x, thresh):
9-
r"""scaling.
8+
def _l2(x, alpha):
9+
r"""Scaling operation.
1010
11-
Applies soft thresholding to vector ``x - g``.
11+
Applies the proximal of ``alpha||y - x||_2^2`` which is essentially a scaling operation.
1212
1313
Parameters
1414
----------
1515
x : :obj:`numpy.ndarray`
1616
Vector
17-
thresh : :obj:`float`
18-
Threshold
17+
alpha : :obj:`float`
18+
scaling parameter
1919
2020
Returns
2121
-------
22-
x1 : :obj:`numpy.ndarray`
23-
Tresholded vector
22+
y : :obj:`numpy.ndarray`
23+
proximal of ``alpha||y - x||_2^2``
2424
2525
"""
26-
y = 1 / (1 + 2 * thresh) * x
26+
y = 1 / (1 + 2 * alpha) * x
2727
return y
2828

2929

@@ -76,8 +76,6 @@ def __init__(self, sigma=1., kappa=1., g=None):
7676
super().__init__(None, False)
7777
self.sigma = sigma
7878
self.kappa = kappa
79-
# self.g = g
80-
# self.gdual = 0 if g is None else g
8179
self.count = 0
8280

8381
def __call__(self, x):

0 commit comments

Comments
 (0)