Initialization: residual , initial value of , iteration counter , the lower bound of preestimated sparsity and the upper bound of preestimated sparsity .
Stage 1: preestimate the sparsity.
Step 1: Compute the amplitude of the inner product of the residual and the measurement matrix , that is, . The -th entry of vector is denoted by ,.
Step 2: Initialize the preestimated sparsity by .
Step 3: The criterion of sparsity underestimation is used to estimate the sparsity. Judge whether is satisfied or not. If it is satisfied, update the sparsity bound ,, then go to Step 4. Otherwise, , repeat Step 2.
Step 4: The criterion of sparsity overestimation is used to estimate the sparsity. Update . Judge whether is satisfied or not. If it is satisfied, update sparsity , then go to Stage 2. Otherwise, update the upper bound of sparsity, repeat Step 4 until the condition is satisfied.
Stage 2: The signal is reconstructed by SAMP algorithm.
Initialization: the residual , the index set , atom set , the finalist set , denotes the empty set, the iteration counter , sparsity initial value .
Step 5: Compute , select indices corresponding to the largest absolute values in to form the set . Augment the index set . is the submatrix of with the indices in set .
Step 6: If the length of is less than , return , otherwise go to Step 7.
Step 7: Solve a least squares problem to obtain a new estimation: .
Step 8: Select entries from the absolute value of to consist , the corresponding submatrix is , the corresponding index set is , and update the finalist set .
Step 9: Increment , calculate the new residual .
Step 10: If , then go to Step 13, otherwise go to Step 11.
Step 11: If , then , go to Step 5, otherwise go to Step 12.
Step 12: Update , and go to Step 5.
Step 13: Return based on the nonzero values of at position .