How many mixed rye breads should a bakery chain bake next Monday? Ideally, every customer gets the bread of their choice without a loaf left over. Many factors go into the calculation, including sales the previous week, whether next Monday is a vacation, or whether the bread is currently being advertised. Translating them into input values for a computer program, it can calculate demand in several ways, for example:

Weight the factors and add up
  • Initial value: sales last Monday
  • if vacations, then minus 10 loaves
  • if advertising, then plus 20 loaves
  • 1., 2., 3. …
Consider all cases individually
  • 1st method: Weight the factors and sum them up.
  • 2nd method: Consider all cases individually
  • if vacations and advertising, then plus 7 loaves of bread
  • 1., 2., 3., …

The prediction becomes more accurate the more data is included, e.g. also the Monday rye mixed bread sales curve of the last years. The program learns from such data – hence the term machine learning (ML).