Teach Your Model to Choose
Learn how classification models categorize data, making discrete choices based on learned patterns and decision boundaries.
We'll cover the following...
In the previous section, you used regression models to predict continuous values such as house prices or temperatures.
Now, we’ll shift to a different problem—classification—where the goal is to predict categories or labels instead of numeric values. For example, you might want to detect whether an email is spam or predict whether a customer will churn or stay. Classification models are designed for these tasks where the output falls into one of several predefined classes.
What is classification?
Classification is a machine learning task where the model learns to assign input data into one of several predefined categories or classes. Instead of forecasting a number, our model predicts a label or a group.
Classification analyzes input data and predicts which discrete category it belongs to. Think of it as teaching the model to sort items into distinct buckets. This relationship can be expressed in equation form as:
Here,