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|Λ|=k∥AΛTr0∥1  // 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|=kS∥AWTrt∥1  // find kS columns of AT that are most strongly correlated with residual rt
  Tt=Λt∪Wt  // merge the new columns such that |Tt|=k+kS
  h=ATt†y  // 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=y−AΛt+1xΛt+1  // update the residual
  t=t+1
 end while