lsqr#
- mrinufft.extras.optim.lsqr(operator: FourierOperatorBase, kspace_data: ndarray[tuple[int, ...], dtype[_ScalarType_co]], damp: float = 0.0, atol: float = 1e-06, btol: float = 1e-06, conlim: float = 100000000.0, max_iter: int = 100, x0: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None = None, x_init: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None = None, callback: Callable | None = None, progressbar: bool | tqdm_asyncio = True)[source]#
Solve a general regularized linear least-squares problem using the LSQR algorithm.
Solves problems of the form .. math:
\arg\min \|A x - b\|_2^2 + \gamma^2 \|x - x0\|_2^2
Stop iterating if:
numerical convergence is reached: \(\|Ax-b\| <= atol \|A\| * \|x\| + btol * \|b\|\)
estimation of the conditioning of the problem diverge:
cond(A)>=conlimMaximum number of iteration reached.
- Parameters:
$base_params
atol (float, optional) – Stopping tolerance on the absolute error. Default is 1e-6.
btol (float, optional) – Stopping tolerance on the relative error. Default is 1e-6.
conlim (float, optional) – Limit on condition number. Iteration stops if condition exceeds this value. Default is 1e8.
$returns
References
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.