Classification
Classification
Classification in machine learning assigns data points to predefined categories, unlike regression, which predicts continuous values. When working with classification algorithms, you create decision boundaries that separate different classes, whether in binary classification (spam/not spam emails) or multi-class problems (categorizing customer feedback into positive/neutral/negative sentiments).
In real-world applications like fraud detection, many classification models output probabilities rather than fixed labels. You must choose a threshold to convert these probabilities into decisions. Adjusting the standard 0.5 threshold affects your results based on business priorities.
When might you prefer a low or high threshold? When screening loan applications, a lower threshold catches more potential defaults but might reject valid applications. In comparison, a higher threshold approves more loans but might miss some risky cases. You must consider which errors are more costly, false alarms or missed detections, as this drives your threshold selection.
In the Logistic regression module, you learned how to use the sigmoid function to convert raw model output to a value between 0 and 1 to make probabilistic predictions - for example, predicting that a given email has a 75% chance of being spam. But what if your goal is not to output probability but a category - for example, predicting whether a given email is "spam" or "not spam"?
Classification is the task of predicting which of a set of classes (categories) an example belongs to. In this module, you'll learn how to convert a logistic regression model that predicts a probability into a binary classification model that predicts one of two classes. You'll also learn how to choose and calculate appropriate metrics to evaluate the quality of a classification model's predictions. Finally, you'll get a brief introduction to multi-class classification problems, which are discussed in more depth later in the course.
Source: Google for Developers, https://developers.google.com/machine-learning/crash-course/classification
This work is licensed under a Creative Commons Attribution 4.0 License.