What Is an ML Problem?
Before choosing an algorithm or writing Python code, we need to understand the problem we are trying to solve.
No. Many problems can be solved with simple rules, formulas, database queries, or traditional software. Machine Learning becomes useful when we want a system to learn useful patterns from data.
Start With the Real-World Problem
A Machine Learning project usually starts with a real-world problem, not with an algorithm.
For example, imagine an online store wants to identify customers who are likely to buy a product.
The business wants an answer that can help it make a decision.
Turn the Problem Into Something We Can Learn
A computer cannot simply receive a vague business question and magically solve it.
We need to describe the problem using data.
An ML Problem Needs Data
If we want a model to learn something, we need information from which it can learn.
Visited the product page 5 times.
Visited the product page once.
Added the product to the cart.
These examples give the system information about customers and their behavior.
We Need Something We Want the Model to Produce
Data alone is not enough. We also need to clearly define what we want the model to predict or decide.
The Core Structure of an ML Problem
Most Machine Learning problems can be understood by asking a few basic questions.
These are the pieces of data available to the system.
This defines the output we want from the model.
These examples provide the experience from which the model can learn.
We need a way to evaluate the quality of the model's results.
Example: House Price Prediction
We can apply the same thinking to the house-price example from Lesson 1.
For example, house size.
The value we want the model to estimate.
We are not starting with "Which algorithm should I use?" We first define what information we have and what we want to predict.
Example: Spam Detection
Consider another problem: deciding whether an email is spam.
Words, sender information, links, and other available information.
The decision we want the model to make.
Not Every Problem Needs ML
This is an important point. Using Machine Learning just because it is available is a bad engineering decision.
Example: if the customer's cart is empty, disable the checkout button.
Example: estimate which customers are likely to purchase based on historical behavior.
A Good ML Problem Has a Clear Goal
Before building a model, we should be able to describe the problem clearly.
Don't start with the algorithm. Start with the problem.
First understand the real-world goal, identify the available data, define the desired output, and decide how success will be measured. Only then should we choose an appropriate Machine Learning approach.
Can You Identify the ML Problem?
What information could we use as input?
What output do we want the model to produce?
What customer information could help the system make the recommendation?