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.

Get hands-on with 1400+ tech skills courses.