Module 2 — Machine Learning Fundamentals
What Is Machine Learning?
Machine Learning (ML) is a subset of AI where systems learn from data rather than being explicitly programmed. Instead of writing rules for every situation, we show the machine examples and let it discover patterns.
Think of it like teaching a child to recognise cats: rather than defining every possible cat feature, you show thousands of cat pictures until the child (or algorithm) learns what makes a cat a cat. The machine finds patterns in the data that humans might never explicitly articulate.
ML is powerful when: the problem is too complex for explicit rules, the patterns change over time, or you have abundant data from which to learn. It's less suitable when you need explainable decisions, have very little data, or when the cost of errors is catastrophic and unpredictable.
Supervised, Unsupervised & Reinforcement Learning
Supervised learning is like learning with a teacher who shows you questions and correct answers. The algorithm learns from labelled data — input-output pairs — and generalises to make predictions on new, unseen data.
Two main types: Classification predicts a category (spam vs. not spam, fraudulent vs. legitimate, positive vs. negative sentiment). Regression predicts a continuous number (house price, customer lifetime value, demand forecast).
Unsupervised learning is like exploring without a teacher. The algorithm finds hidden structures in unlabelled data. Clustering groups similar data points (customer segmentation — discovering natural groupings in customer behaviour). Dimensionality reduction simplifies complex datasets while preserving important patterns (compressing 50 features into 5 meaningful dimensions).
Reinforcement learning (RL) is like learning through trial and error. An agent takes actions in an environment, receives rewards or penalties, and learns to maximise cumulative reward over time. RL powers game-playing AI (AlphaGo, Atari), robotics, recommendation systems, and autonomous vehicles.
The choice of paradigm depends on the problem and available data: have labelled examples? → supervised. Want to discover structure? → unsupervised. Learning through interaction? → reinforcement.
Key Takeaways
- Machine learning discovers patterns from data rather than following explicit rules
- Supervised learning uses labelled data for classification and regression
- Unsupervised learning finds hidden patterns in unlabelled data
- Reinforcement learning optimises behaviour through trial, error, and rewards
- The choice of ML paradigm depends on the problem type and available data
Exercises & Activities
ML Paradigm Matching
For each business problem below, identify the correct ML paradigm (supervised classification, supervised regression, unsupervised clustering, or reinforcement learning) and explain why: (1) Predicting which customers will cancel their subscription, (2) Grouping products into categories based on purchasing patterns, (3) Estimating the price of a house based on features, (4) Teaching a robot to navigate a warehouse, (5) Detecting fraudulent credit card transactions.
Machine Learning Fundamentals
Test your understanding.
Email spam detection is an example of:
What makes reinforcement learning different from supervised learning?
Interactive AI Tutor Session
Copy this prompt and paste it into your preferred AI assistant (ChatGPT, Claude, Gemini) to begin your interactive tutoring session for this module.
"You are a machine learning instructor for non-technical learners. Explain how machines learn from data using everyday analogies. Cover supervised learning (spam detection), unsupervised learning (customer segmentation), and reinforcement learning (game-playing AI). Ask the student to match five business problems to the correct ML paradigm and explain their reasoning."
