sparse.greedy_pursuit.matching_pursuit¶
- sparse.greedy_pursuit.matching_pursuit(mat_a, b, n_iters, weak_threshold=1.0, tol=1e-09)[source]¶
(Weak) Matching Pursuit (MP, WMP) algorithms find an approximate solution to (1). Compared to OMP, MP and WMP algorithms are weaker (in terms of having larger residual) but faster.
- Parameters
- mat_a(N, M) np.ndarray
The input weight matrix \(\boldsymbol{A}\).
- b(N,) np.ndarray
The right side of the equation (1).
- n_itersint
The number of iterations to perform. The number of non-zero coefficients in the solution \(\vec{x}\) is at most n_iters.
- weak_thresholdfloat, optional
A threshold in range (0, 1] for WMP algorithm that defines an early stop. If set to 1., MP algorithm is used. Default is 1. (MP).
- tolfloat, optional
The tolerance which determines when a solution is “close enough” to the optimal solution. Compared with L2-norm of residuals (errors) at each iteration.
- Returns
- Solution
Refer to Greedy Matching Pursuit algorithms.
Notes
If the sparseness condition (1) is satisfied, the true unknown solution is recovered.