pylops.optimization.sparsity.splitbregman¶
- pylops.optimization.sparsity.splitbregman(Op, y, RegsL1, x0=None, niter_outer=3, niter_inner=5, RegsL2=None, dataregsL2=None, mu=1.0, epsRL1s=None, epsRL2s=None, lambdaRL1s=None, tol=1e-10, rtol=0.0, rtol1=0.0, tau=1.0, restart=False, engine='scipy', show=False, itershow=(10, 10, 10), show_inner=False, callback=None, preallocate=False, kwargs_solver=None, **kwargs)[source]¶
Split Bregman for mixed L2-L1 norms.
Solve an unconstrained system of equations with mixed \(L_2\) and \(L_1\) regularization terms given the operator
Op, a list of \(L_1\) regularization termsRegsL1, and an optional list of \(L_2\) regularization termsRegsL2.- Parameters:
- Op
pylops.LinearOperator Operator to invert
- y
numpy.ndarray Data
- RegsL1
list \(L_1\) regularization operators
- x0
numpy.ndarray, optional Initial guess
- niter_outer
int, optional Number of iterations of outer loop
- niter_inner
int, optional Number of iterations of inner loop of first step of the Split Bregman algorithm. A small number of iterations is generally sufficient and for many applications optimal efficiency is obtained when only one iteration is performed.
- RegsL2
list, optional Additional \(L_2\) regularization operators (if
None, \(L_2\) regularization is not added to the problem)- dataregsL2
list, optional \(L_2\) Regularization data (must have the same number of elements of
RegsL2or equal toNoneto use a zero data for every regularization operator inRegsL2)- mu
float, optional Data term damping
- epsRL1s
list, optional \(L_1\) Regularization dampings (must have the same number of elements as
RegsL1). Note that the effective weight of each \(L_1\) regularization term in the cost function isepsRL1s[i]**2- epsRL2s
list, optional \(L_2\) Regularization dampings (must have the same number of elements as
RegsL2)- lambdaRL1s
list, optional Added in version 2.9.0.
Weights of the splitting terms (must have the same number of elements as
RegsL1). They do not change the solution of the problem, but affect the convergence speed of the algorithm. IfNone, they are set equal toepsRL1s- tol
float, optional Tolerance. Stop the solver if difference between inverted model at subsequent iterations is smaller than
tol- rtol
float, optional Relative tolerance on total cost function wrt initial total cost function. Stops the solver when the ratio of the current total cost function to the initial total cost function is below this value.
- rtol1
float, optional Relative tolerance on total cost function wrt to data. Stops the solver when the ratio of the current total cost function to the data norm is below this value.
- tau
float, optional Scaling factor in the Bregman update (must be close to 1)
- restart
bool, optional The unconstrained inverse problem in inner loop is initialized with the initial guess (
True) or with the last estimate (False)- engine
str, optional Solver used for the \(\mathbf{x}\)-subproblem of the Split Bregman algorithm:
scipyforscipy.sparse.linalg.lsqrorpylopsforpylops.optimization.solver.cgls. Note thatpylops.optimization.solver.cglsis always used whenyis not a NumPy array (e.g., CuPy or JAX array)- show
bool, optional Display iterations log
- itershow
tuple, 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.
- show_inner
bool, optional Display iteration logs of the solver of the \(\mathbf{x}\)-subproblem
- callback
callable, optional Function with signature (
callback(x)) to call after each iteration wherexis the current model vector- preallocate
bool, optional Added in version 2.6.0.
Pre-allocate all variables used by the solver. Note that if
yis a JAX array, this option is ignored and variables are not pre-allocated since JAX does not support in-place operations.- kwargs_solver
dict, optional Added in version 2.9.0.
Keyword arguments for the solver of the \(\mathbf{x}\)-subproblem (
scipy.sparse.linalg.lsqrorpylops.optimization.solver.cgls, seeengine). Entries override duplicate values in**kwargs.- **kwargs
Deprecated, will be removed in v3.0.0. Simply kept for back-compatibility with previous implementation.
Another way to pass keyword arguments to the solver of the \(\mathbf{x}\)-subproblem.
- Op
- Returns:
- xinv
numpy.ndarray Inverted model
- itn_out
int Iteration number of outer loop upon termination
- cost
numpy.ndarray, optional History of the total cost function through iterations
- xinv
Notes