On Sequence Clustering and Supervised Dimensionality Reduction