pyproximal.optimization.primal.GeneralizedProximalGradientΒΆ

pyproximal.optimization.primal.GeneralizedProximalGradient(proxfs: list[ProxOperator], proxgs: list[ProxOperator], x0: ndarray[tuple[Any, ...], dtype[_ScalarT]], tau: float | None, epsg: float | ndarray[tuple[Any, ...], dtype[_ScalarT]] = 1.0, weights: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None, eta: float = 1.0, niter: int = 10, acceleration: str | None = None, tol: float | None = None, rtol: float | None = None, callback: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], None] | None = None, show: bool = False, itershow: tuple[int, int, int] = (10, 10, 10)) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]ΒΆ

Generalized Proximal gradient

Solves the following minimization problem using Generalized Proximal gradient algorithm:

\[\mathbf{x} = \argmin_\mathbf{x} \sum_{i=1}^n f_i(\mathbf{x}) + \sum_{j=1}^m \epsilon_j g_j(\mathbf{x}),~~n,m \in \mathbb{N}^+\]

where the \(f_i(\mathbf{x})\) are smooth convex functions with a uniquely defined gradient and the \(g_j(\mathbf{x})\) are any convex function that have a known proximal operator.

Parameters:
proxfslist

Proximal operators of the \(f_i\) functions (must have grad implemented)

proxgslist

Proximal operators of the \(g_j\) functions

x0numpy.ndarray

Initial vector

taufloat

Positive scalar weight, which should satisfy the following condition to guarantees convergence: \(\tau \in (0, 1/L]\) where L is the Lipschitz constant of \(\sum_{i=1}^n \nabla f_i\).

epsgfloat or numpy.ndarray, optional

Scaling factor(s) of g function(s). If a scalar is provided the same scaling factor is applied to every g function.

weightsfloat, optional

Weighting factors of g functions. Must sum to 1.

etafloat, optional

Relaxation parameter (must be between 0 and 1, 0 excluded). Note that this will be only used when acceleration=None.

niterint, optional

Number of iterations of iterative scheme

acceleration: :obj:`str`, optional

Acceleration (None, vandenberghe or fista)

tolfloat, optional

Tolerance on change of objective function (used as stopping criterion). If tol=None, run until niter is reached or the other tolerance criterion is met

rtolfloat, optional

Relative tolerance on objective function wrt initial value. Stops the solver when the ratio of the current objective function to the initial objective function is below this value. If rtol=None, run until niter is reached or the other tolerance criterion is met

callbackcallable, optional

Function with signature (callback(x)) to call after each iteration where x is the current model vector

showbool, optional

Display iterations log

itershowtuple, optional

Display set log for the first N1 steps, last N2 steps, and every N3 steps in between where N1, N2, N3 are the three element of the list.

Returns:
xnumpy.ndarray

Inverted model

Notes

See pyproximal.optimization.cls_primal.GeneralizedProximalGradient