Skip to main content
. Author manuscript; available in PMC: 2014 Sep 9.
Published in final edited form as: Med Image Comput Comput Assist Interv. 2013;16(0 1):114–121. doi: 10.1007/978-3-642-40811-3_15

Algorithm 1.

The framework of online dictionary learning in mini-batch mode.

Input: Initialized dictionary D0Rn×k, input data yiRn, number of iterations T, regularization parameter λR.
Output: Learned dictionary DT
A0 = 0, B0 = 0.
for t = 1 → T do
  Randomly draw a set from Y : yt,1, yt,2, …, yt,τ.
  for i = 1 → τ do
   Sparse coding: αt,i=argminαRk12yt,i-Dt-1α22+λα1.
  end for
   At=βAt-1+i=1ταt,iαt,iT,Bt=βBt-1+i=1τyt,iαt,iT,
  where β=θ+1-τθ+1, and θ = if t < τ, θ = τ2 + tτ otherwise.
  Dictionary update: Compute Dt, so that:
   argminD1tσi=1t12yi-Dαi22+λαi1=argminD1t(12Tr(DTDAt)-Tr(DTBt)).
end for