This textbook for senior undergraduate and graduate students offers comprehensive coverage, an algorithmic perspective, and a wealth of examples in exploratory data analysis, pattern mining, clustering, and classification. New to this second edition are several chapters on regression, including neural networks and deep learning.