Common Machine Learning Tasks

⏱️ 12 min 📚 Lesson 3 of 11
1 / 9
👋

Welcome Back!

Having learned the different approaches ML uses to learn from data, we now explore what tasks ML can actually perform. In this lesson, you’ll discover classification, regression, and clustering, and understand how to choose the right task for the problem at hand.

🏷️

Classification

Classification is an ML task where the output is a category or label. For example, determining whether an email is "spam" or "not spam" is classification.

The model learns from examples of each class. Other examples include identifying if a picture contains a cat or dog, or deciding if a loan applicant is "approved" or "denied".

The model assigns each input to one of the predefined classes.

📈

Regression

Regression is when the model predicts a continuous number. For instance, predicting the price of a house from its features is a regression problem.

The output could be any value: house prices, stock market values, or temperatures. The model learns how input features relate to a numeric output and makes a best guess for new inputs.

🔵

Clustering

Clustering groups similar data points together without labels. It's an unsupervised task.

Imagine plotting customer data on a chart; a clustering algorithm will draw circles around groups of similar customers. For example, it might group shoppers by buying habits.

Clustering helps us discover the natural structure in data.

🎯

Choosing the Right Task

Which task to use depends on our goal. If we want categories (yes/no, types), we use classification. If we want a number, we use regression. If we want to explore structure without labels, we use clustering.

For example: predicting house price (regression) vs. deciding if an email is urgent (classification) vs. grouping customers by behavior (clustering).

🔄

Model Flexibility

Some algorithms can handle both classification and regression (depending on output). For instance, a decision tree or neural network can either classify or predict a number.

The key is to match the model setup to the output type: categorical or continuous.

Quiz: Task Types

Which Problem Is An Example Of Regression?

A
Classifying emails as spam or not
B
Predicting tomorrow's temperature
C
Grouping animals into species
D
Training a chatbot through conversation

Fill in the Blank

When each example's output is a numeric value, the machine learning task is called ___.

💡 Drag the correct word from below into the blank to complete the sentence.
When each example's output is a numeric value, the machine learning task is called
Classification
Regression
Clustering
Supervised

Reflection

💭

Think of a prediction you make every day (like guessing the time, weather, or a person's age).

Would this be better framed as classification, regression, or clustering? Explain why and what the inputs and outputs would be.

Lesson Completed!

Great job! You now know the main ML tasks: classification, regression, and clustering. Ready for more?