If I have a set of known patterns (e.g. one is of 50x3 dimension, another one is of 45x3), how can i find similar patterns in large datasets?