Effective Dimensionality Reduction in Pattern Recognition