CoSaMP¶
Compressive sampling matching pursuit (CoSaMP) algorithm.
This implementation currently does not handle complex signals.
-
mr_utils.cs.greedy.cosamp.
cosamp
(A, y, k, lstsq='exact', tol=1e-08, maxiter=500, x=None, disp=False)[source]¶ Compressive sampling matching pursuit (CoSaMP) algorithm.
Parameters: - A (array_like) – Measurement matrix.
- y (array_like) – Measurements (i.e., y = Ax).
- k (int) – Number of expected nonzero coefficients.
- lstsq ({'exact', 'lm', 'gd'}, optional) – How to solve intermediate least squares problem.
- tol (float, optional) – Stopping criteria.
- maxiter (int, optional) – Maximum number of iterations.
- x (array_like, optional) – True signal we are trying to estimate.
- disp (bool, optional) – Whether or not to display iterations.
Returns: x_hat – Estimate of x.
Return type: array_like
Notes
lstsq function - ‘exact’ solves it using numpy’s linalg.lstsq method. - ‘lm’ uses solves with the Levenberg-Marquardt algorithm. - ‘gd’ uses 3 iterations of a gradient descent solver.
Implements Algorithm 8.7 from [1].
References
[1] Eldar, Yonina C., and Gitta Kutyniok, eds. Compressed sensing: theory and applications. Cambridge University Press, 2012.