AI Learning Courses
AI Learning Courses › Chapters › Chapter 4
CHAPTER 4 OF 15

Machine Learning and How Machines Learn

Machine learning is the engine of modern AI. There are several ways a machine can learn, just as people learn from a teacher, by exploring on their own, or by trial and error.

▶ Watch the 9 narrated lessons Take the chapter quiz
The three classic types of machine learning, with typical uses.
The three classic types of machine learning, with typical uses.
▶ Play this diagram as a visual lesson

1. Supervised learning ▶ Watch

The model learns from labelled examples - inputs paired with the correct answers. It is like a student studying with an answer key. Two main tasks:

2. Unsupervised learning ▶ Watch

The model receives data without labels and must find structure by itself. Common tasks are clustering (grouping similar customers), anomaly detection (spotting an unusual bank transaction) and dimensionality reduction (compressing many features into a few for visualisation).

3. Reinforcement learning ▶ Watch

In reinforcement learning an agent learns which actions earn the most reward over time.
In reinforcement learning an agent learns which actions earn the most reward over time.
▶ Play this diagram as a visual lesson

An agent takes actions in an environment and receives rewards or penalties. Over many attempts it learns a strategy that maximises reward. This is how AlphaGo mastered Go and how robots learn to walk in simulation. A variant, reinforcement learning from human feedback (RLHF), is used to make chat assistants more helpful and safe.

Other important learning methods ▶ Watch

Common machine learning algorithms ▶ Watch

AlgorithmTypeTypical use
Linear regressionSupervised (regression)Predicting prices or sales
Logistic regressionSupervised (classification)Yes/no predictions such as churn
Decision treeSupervisedEasy-to-explain decisions
Random forestSupervisedRobust predictions from many trees
Gradient boostingSupervisedTop results on table data
Support vector machineSupervisedText and image classification
k-nearest neighboursSupervisedSimple recommendation and similarity
Naive BayesSupervisedFast spam filtering
k-meansUnsupervisedCustomer segmentation
Neural networksAnyImages, speech, language, generation

Chapter summary

  • Supervised learning uses labelled examples; unsupervised learning finds hidden structure; reinforcement learning learns from rewards.
  • Self-supervised learning lets LLMs learn from vast unlabelled text.
  • Transfer learning and fine-tuning adapt big pre-trained models to specific jobs.
  • Classic algorithms such as decision trees remain very useful, especially for table data.