04.01 Lesson 1 of 16

54 min

ML Problem Framing & Learning Types

Translate a vague prediction idea into a concrete machine-learning task with a defined target, available features and evaluation objective.

By the end of this lesson

You will be able to

  • Distinguish regression, classification and clustering.
  • Separate the business question from the model choice.
  • State when each feature becomes available and what an acceptable error means.

Start with the prediction contract

A machine-learning task begins with an observation unit and an outcome. For Bank Marketing, one row represents a client-contact example and the target y records whether the client subscribed to a term deposit. The feature matrix X contains information available before the prediction; the target vector y contains the outcome you want the model to learn. Write the prediction moment explicitly. A field recorded after that moment is not a valid feature, even if it improves a score.

# X: information available before the call
# y: whether the client subscribed
X = df.drop(columns=["y", "duration"])
y = df["y"]

Choose the learning setup from the target

In supervised learning, examples come with labels. Regression predicts a numeric quantity such as demand; classification predicts a category or class probability. In unsupervised learning, no target is supplied: clustering groups observations, while dimensionality reduction compresses their representation. The algorithm is not the objective. A good problem statement names the target, prediction time, decision, error costs and a baseline that a model must improve.

Apply what you learned

Exercise

Write a prediction brief

Choose a prediction question and define its data contract before choosing an algorithm.

  1. State the observation unit and target variable.
  2. Classify the task as regression, classification or unsupervised learning.
  3. List at least five candidate features and state when each becomes available.
  4. Write one realistic baseline that does not require a fitted model.
  5. Choose one primary metric and explain what a false positive or false negative would cost.
Done when

The brief names the target, observation unit, prediction time, permitted features, baseline and evaluation metric. It does not choose an algorithm before defining the task.

Free references

Study resources

1 links
  1. 01
    Getting Started with scikit-learn Article

    Read the estimator basics and short example that fits, predicts and evaluates a model. Treat it as a reference, not a full course.

Check your understanding

Self-test

2 questions
  1. Question 1

    What makes a task supervised?

  2. Question 2

    Why is prediction time part of the feature definition?

Completion check

Move on when

You can write a prediction contract that identifies the task, target, observation unit, prediction time, valid features and evaluation objective.

Quick find

Search Michi

Type to search every stage, section, unit, topic and resource.

Enter opens the first result Esc closes

Reference

Keyboard shortcuts

n
Continue to the first unit not passed
j / k
Next / previous unit
1 2 3
Toggle learned, practised, passed
/
Open search
?
Show this help
Esc
Close open panels