You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Machine learning (ML) is the branch of AI that enables systems to learn from data rather than being explicitly programmed with rules. Instead of telling a computer how to solve a problem step by step, you show it many examples and let it discover the patterns itself.
Traditional Programming:
┌──────────────┐ ┌───────────┐ ┌──────────┐
│ Rules │────▶│ Program │────▶│ Output │
│ Data │────▶│ │ │ │
└──────────────┘ └───────────┘ └──────────┘
Machine Learning:
┌──────────────┐ ┌───────────┐ ┌──────────┐
│ Data │────▶│ Learning │────▶│ Rules │
│ Outputs │────▶│ Algorithm │ │ (Model) │
└──────────────┘ └───────────┘ └──────────┘
In traditional programming, a developer writes explicit rules. In machine learning, you provide examples, and the algorithm learns the patterns. The output is a model — a mathematical function that can make predictions on new, unseen data.
| Term | Definition |
|---|---|
| Features | The input variables used to make predictions |
| Labels | The correct answers in the training data |
| Training data | The dataset used to teach the model |
| Test data | A separate dataset for evaluation |
| Model | The mathematical function learned from data |
| Prediction | The model's output for new input |
| Hyperparameters | Configuration settings chosen before training |
| Epoch | One complete pass through the training dataset |
Total Dataset (e.g., 10,000 samples)
├── Training Set (80%) ─── 8,000 samples ─── Used to train the model
├── Validation Set (10%) ─ 1,000 samples ─── Used to tune hyperparameters
└── Test Set (10%) ─────── 1,000 samples ─── Used for final evaluation only
Important: The test set must never be used during training. Using it would give an overly optimistic estimate of performance.
The model learns from labelled examples — input-output pairs where the correct answer is known.
Regression predicts a continuous value (house prices, blood pressure, sales revenue). Classification predicts a discrete category (spam/not spam, dog breed, disease type).
Common algorithms: linear regression, logistic regression, decision trees, random forests, SVMs, k-nearest neighbours.
No labels. The algorithm finds structure in the data on its own.
Clustering groups similar data points (customer segmentation, anomaly detection). Dimensionality reduction simplifies data while preserving key information (PCA, t-SNE).
An agent learns by interacting with an environment, receiving rewards for good actions and penalties for bad ones.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.