Skip to main content
. Author manuscript; available in PMC: 2014 Jun 5.
Published in final edited form as: Proc SIAM Int Conf Data Min. 2013;2013:342–349. doi: 10.1137/1.9781611972832.38

Algorithm 1 K-SVD Dictionary Construction18

1:  Initialize J by the discrete cosine transformation matrix
2: repeat
3:  Find sparse coefficients Λ(λis) using any pursuit algorithm.
4: for j = 1, 2, …, update ji, the j-th column of J, by the following process do
5:  Find the group of vectors that use this atom: ζi: = {i: 1 ≤ iM, λi(j) ≠ 0}
6:  Compute where Ej: = Q − Σij ji ΛiT where ΛiT is the i-th row of Ë
7:  Extract the i-th columns in Ej, where i ∈ ζj, to form EjR
8:  Apply SVD to get EjR=UΔV
9: ji is updated with the first column of U
10:  The non-zeros elements in ΛTj is updated with the first column of V × Δ(1,1)
11: end for
12: until Convergence criteria is met