pattern recognition learning