14. Classification#
This chapter introduces classification as supervised machine learning for category prediction. You will study nearest neighbors, training and testing, feature tables, implementation, and accuracy.
Chapter Video
Video credit: CrashCourse. (2018, October 31). Supervised Machine Learning: Crash Course Statistics #36. YouTube. Watch on YouTube.
This embedded video is provided for educational reference only. All rights are retained by the respective copyright holder.
Learning Objectives
By the end of this chapter, you will be able to:
Distinguish classification from regression and clustering.
Use labeled examples to predict categorical outcomes.
Explain nearest-neighbor classification with distance and similarity.
Separate training data from testing data when evaluating a classifier.
Measure classifier accuracy and discuss limits of prediction.
Chapter Flow
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
Classification |
Predicting a categorical label for an observation. |
2 |
Classifier |
A model or rule that assigns labels. |
3 |
Label |
The category being predicted. |
4 |
Feature |
An input variable used for prediction. |
5 |
Training data |
Labeled data used to build a classifier. |
6 |
Test data |
Labeled data reserved for evaluation. |
7 |
Nearest neighbor |
A classifier that predicts from the most similar example. |
8 |
Distance |
A numeric measure of dissimilarity between observations. |
9 |
Similarity |
How alike two observations are according to selected features. |
10 |
Feature space |
The coordinate system formed by model features. |
11 |
Decision boundary |
The region where predicted labels change. |
12 |
Accuracy |
The fraction of test cases classified correctly. |
13 |
Error rate |
The fraction of test cases classified incorrectly. |
14 |
Confusion matrix |
A table comparing predicted labels with true labels. |
15 |
False positive |
A case incorrectly predicted as belonging to a class. |
16 |
False negative |
A case incorrectly predicted as not belonging to a class. |
17 |
Overfitting |
When a classifier matches training data too closely. |
18 |
Generalization |
Performance on new data beyond the training sample. |
19 |
Supervised learning |
Learning from examples with known labels. |
20 |
Validation |
Checking model choices using held-out data. |
21 |
Row of a table |
One observation or case in a dataset. |