| f ← # of features |
| X ← features measurements at each window; ∈ ℝf |
| ND ← # of discrete motion classes |
| DMC ← {set of all Discrete Motion Classes} |
| MC ← {set of discrete and dual combined motion classes} |
| for i = 1:ND |
| OUTPUT_CLASS1,i = DMCi |
| OUTPUT_CLASS2,i = arg max(p(X|Movement#1 = DMCi)) |
| end |
| Np ← # of paired of columns in OUTPUT_CLASS |
| P ← {set of all columns appearing twice in OUTPUT_CLASS} ∈ ℝNp |
| if Np = 0 |
| RETURN(No Motion) |
| elseif Np = 1 |
| RETURN(P) |
| elseif Np > 1 |
| RETURN(arg max (p(X|P))) |
| end |