Supervised and Unsupervised Pattern Recognition