|
|
| Algorithm 2 Motif selection algorithm. |
|
|
| Require: B, the Codebook of the motifs; S(i), the segment to be compressed; d(·), a dissimilarity metric; dth, the compression distortion threshold. |
| dmin ← ∞ |
| G̅ ← Q(GAIN(S(i))) |
| for all X(k) ∈ B do |
| XR(k) ← X(k)G̅ + O̅ |
| if d(S(i),XR(k)) < dmin then |
| X̂(i) = XR (k) |
| dmin = d(S(i),XR(k)) |
| end if |
| end for |
| Return k |
|
|