Skip to content
AI-grafen
DAI developerAI product development· about 45 min· fundamentals that rarely change· verified 2026-09-20· EN

Framing a problem as an ML task

Be able to judge whether ML is the right tool and to define the input, the output and the success metric.

Intuition

Before a single line of code: is this even an ML problem?

ML suits you when: the rule is hard to write but examples exist (images, text, behaviour), the pattern is stable over time, and mistakes are acceptable. ML does not suit you when: a rule is enough (VAT = 25 %), there is almost no data, every mistake is unacceptable, or the decision has to be legally explainable.

The framing (write it down):

  • Input: exactly what the model sees at the moment of the decision — not things that become known later.
  • Output: a class? a number? a ranking? Which question is being answered?
  • Success metric: one number tied to real usefulness — and the level that is good enough.
  • Baseline: what does the simplest rule give? ML has to beat it.

Interactive

An example — «reduce food waste in the school canteen»:

QuestionHow many portions are needed tomorrow?
Inputday of the week, the dish, the number of pupils present yesterday, the weather, holidays
Outputa number (regression)
Metricthe absolute error in portions; the target is < 15
Baselinethe same as the same weekday last week
Datathe kitchen's logs for 2 years — do they exist? in what format?
Riska new menu → the pattern breaks; too few portions is worse than too many

Make the same table for: «flag abusive comments», «recommend the next exercise». Which of them should not be ML?

Mastery means

  • Judges whether ML is the right tool for a problem
  • Defines the input, the output, the success metric and the baseline
  • Identifies where the data is to come from and what can go wrong

Prerequisites

Sign in to do the exercises and build your mastery up.

Sources

All the sources and licences