Understanding Supervised and Unsupervised Learning