Skip to main content
. 2013 Dec 19;14(1):68–94. doi: 10.3390/s140100068
Algorithm 1 Matching-Basedmotif extraction algorithm.
Require: DM, the precomputed distance matrix with d(·), a dissimilarity metric; dth, the threshold for the matching definition; Ktarget, the maximum size for the Codebook.
for all m, n do
   MMmnI(DMmn < dth)
end for
k ← 1
while DM ≠ ∅ and kKtarget do
  for all m do
    MCm ← ∑nMMmn
  end for
  i ← argmaxm(MCm)
  X(k) ← T(i)
  delete the l-th rows and columns in DM and MM for which MMil = 1
  kk+1
end while
Kk