how many types of pattern recognition