MACHINE LEARNING • LESSON 2

Real-World Problem → ML Problem

A real-world problem usually starts as a business, product, or practical question. Before a model can solve it, we need to translate that question into something that can be represented using data.

THE CORE IDEA

Don't ask the model to solve a vague problem. Define exactly what information it receives and what result you want.

Turning a real-world problem into an ML problem is mainly about defining the input, the desired output, and the examples from which the system can learn.

01

Start With a Real-World Question

Imagine an online store wants to increase sales. Someone might ask:

"Which customers are likely to purchase this product?"

This is a useful business question, but it is not yet a clearly defined Machine Learning problem.

02

Define What We Want to Predict

We first need to decide what the model should produce.

VAGUE QUESTION Who will buy?
CLEAR OUTPUT Will this customer buy?

Now the problem has a specific target: determine whether a customer is likely to purchase the product.

03

Identify the Information Available

Next, we need to determine what information is available about each customer.

CUSTOMER DATA Previous purchases

What the customer purchased in the past.

CUSTOMER DATA Website activity

Pages viewed and products interacted with.

CUSTOMER DATA Cart activity

Products added to the shopping cart.

Important:

The model cannot use information that we do not provide as input.

04

Find Historical Examples

If we want the system to learn from past customer behavior, we need historical examples.

Customer Previous Purchases Cart Activity Purchased?
A 5 Yes Yes
B 1 No No
C 3 Yes Yes

The historical examples give us both information about the customers and the outcome that actually happened.

05

Now the ML Problem Is Clear

INPUT Customer information

Previous purchases, activity, cart behavior, and other available information.

MODEL Learn from historical examples

Find patterns that relate customer information to purchasing behavior.

OUTPUT Purchase prediction

Whether the customer is likely to purchase.

06

Another Example: House Prices

The same conversion works for house-price prediction.

REAL-WORLD QUESTION How much will this house cost?
AVAILABLE DATA House characteristics
ML OUTPUT Predicted price
07

The Real-World Problem Is Usually Bigger

A real business problem often contains many questions, requirements, and constraints.

We need to narrow it down to one clearly defined prediction or decision.

TOO BROAD "Increase sales."

This is a business goal, not a specific ML prediction.

MORE SPECIFIC "Predict whether a customer will purchase."

Now we have a defined output that a model can attempt to predict.

08

Don't Force ML Into a Simple Rule

Not every real-world problem should become a Machine Learning problem.

SIMPLE RULE Use traditional programming

If the account balance is zero, prevent a withdrawal.

PATTERN ML may be useful

Predict whether a transaction is likely to be fraudulent based on historical examples.

09

A Simple Conversion Process

01 Real-World Goal

What are we trying to achieve?

02 Available Data

What information do we have?

03 Target

What do we want to predict?

04 ML Problem

Clearly defined prediction or decision.

KEY IDEA

Problem Definition Comes Before Model Selection

A good Machine Learning project starts by defining the problem clearly. If the problem itself is vague, choosing a sophisticated algorithm will not fix it.

QUICK CHECK

Turn These Into ML Problems

"We want to reduce customer churn."

Possible ML problem: predict whether a customer is likely to leave.

"We want to detect fraudulent transactions."

Possible ML problem: predict whether a transaction is fraudulent.

"We want to know tomorrow's temperature."

Possible ML problem: predict tomorrow's temperature using available historical and relevant weather information.

NEXT TOPIC

Prediction Problems

Now that we know how to turn a real-world question into an ML problem, we'll look at one of the most common types: prediction problems.