Part V. Machine Learning#
Machine learning uses patterns in observed data to make predictions or identify groups. This part builds on the regression line from Chapter 12. It introduces scikit-learn and the train/test workflow with models that use several predictors, moves to classifiers and how to evaluate them, and ends with finding groups. It covers model building and evaluation, with attention to what the results can support.
Fig. 2 places these chapters among the three main types of machine learning. Supervised learning learns from examples whose answers are known: regression predicts a number and classification predicts a category. Unsupervised learning finds structure in data without answers, such as groups of similar customers. Reinforcement learning, where a program learns by trial and error from rewards, is beyond this book.
Fig. 2 Types of machine learning and the chapters that cover them.#
Fig. 3 compares the two workflows this part teaches. In supervised learning, a model learns from data whose answers are known, predicts new cases, and is checked on held-out data whose answers are known but were not used to build it. In unsupervised learning, there are no answers: a clustering method produces groups, and the analyst decides what they mean.
Fig. 3 Supervised and unsupervised learning workflows. Chapters 14 and 16 show each one in detail.#
Conceptual Arc
Begin with Multiple Regression. Continue through Classification and Evaluating Classifiers. Finish with Clustering.
Chapters in This Part
Topics: Regression with scikit-learn; Multiple Regression; Choosing Features and Avoiding Overfitting.
Topics: Classification; Nearest Neighbors; Training, Testing, and Accuracy.
Topics: Nearest Neighbors with scikit-learn; Evaluating Classifiers; Logistic Regression.
Topics: Clustering Concepts; K-Means Workflow; Interpreting Clusters; Principal Component Analysis (optional).