Skip to main content
. 2019 Aug 13;19(16):3531. doi: 10.3390/s19163531
Algorithm 3 CoSaMP
 Input: A=ΦΨ,y,k
 Initialize:
r0=y//residualt=0
Λ0=argmax|Λ|=kAΛTr01  // find k columns of AT that are most strongly correlated with residual r0
 Output: k-sparse coefficient vector x
while t<Niter do
  kS=γk,γ[0,1]  // number of new columns to be selected
  Wt=argmax|W|=kSAWTrt1  // find kS columns of AT that are most strongly correlated with residual rt
  Tt=ΛtWt  // merge the new columns such that |Tt|=k+kS
  h=ATty  // find the best coefficients for residual approximation
  Λt+1=suppk,Ψ(h)  // find the set of sparsity Λt+1
  x=F(h,Λt+1)  // find sparse vector x
  rt+1=yAΛt+1xΛt+1  // update the residual
  t=t+1
end while