
This gives us a very important idea:
Machine Learning allows computers to learn patterns from examples rather than requiring humans to write every rule explicitly.
Consider traditional programming.
Traditional approach
We tell the computer:
IF condition A
AND condition B
THEN output X.
The programmer provides the rules.
Machine Learning approach
We provide:
Examples
+
Correct answers
The machine learns patterns that connect the examples to the answers.
Conceptually:
DATA -> PATTERN LEARNING -> MODEL
Then:
NEW DATA -> MODEL –
An Example: Ripe and Unripe Bananas
Suppose we want to create an AI system that identifies whether a banana is ripe.
We collect photographs.
Training examples
| Image | Colour | Shape | Predicted Class |
| Image 1 | Green | Curved | Unripe |
| Image 2 | Green | Curved | Unripe |
| Image 3 | Yellow | Curved | Ripe |
| Image 4 | Yellow | Curved | Ripe |
| Image 5 | Yellow with spots | Curved | Ripe |
The system may discover patterns involving:
Now we give it a new image.
The system examines its features and predicts:
Ripe
This is pattern recognition in action.
Pattern ≠ Rule
This is an important distinction.
A rule is explicitly given.
A pattern may need to be discovered.
Rule
If the traffic light is red, stop.
Someone has given us the rule.
Pattern
Suppose we give a computer thousands of examples of emails labelled:
Spam
and
Not Spam
The computer may discover patterns such as:
The patterns are learned from data.