Machine learning finds a pattern from examples of inputs and outputs, then uses it on new inputs.
| YOE | Salary |
|---|---|
| 1 | 30,000 |
| 2 | 40,000 |
| 4 | 60,000 |
| 3 | ? |
Plot the examples: years of experience (input) against salary (output).
The pattern: a straight line, \(y = mx + c\), with \(m = 10{,}000\) and \(c = 20{,}000\).





Nobody knows the formula for a car's price, a flat's value or whether an email is spam. We learn it from data.





Here the pattern is already known, so there is nothing to learn: just compute.

