Machine Learning is a subset of AI where systems learn patterns from data instead of relying only on explicit rules programmed by humans.
The structural shift from classical programming
Classical programming / GOFAI: Rules + Data → Answers.
Machine learning: Data + Answers → learned mathematical model (rules).
Supervised learning
Training maps input features X to target labels y using labeled examples:
Regression — predict a continuous number (house price, temperature).
Classification — predict a discrete label.
Binary — two classes (spam vs not spam).
Multi-class — many categories (digits 0–9, species labels).
Unsupervised learning
Only unlabeled X is available. The model discovers structure on its own:
Clustering — group similar customers, documents, or transactions.
Dimensionality reduction — compress features while preserving variance.
flowchart LR
A[Data] --> B{Labels?}
B -- Yes --> C[Supervised training]
B -- No --> D[Unsupervised learning]
C --> E[Prediction]
D --> F[Pattern discovery]
Practical ML workflow
Collect, clean, and represent data (features).
Split into train / validation / test sets.
Choose model family and loss function for the task type.
Train, tune hyperparameters, and evaluate generalization.
Deploy, monitor drift, and retrain when performance drops.