On this page10 sections
  1. Prerequisites
  2. Connection With Previous Lectures
  3. Learning Objectives
  4. Lesson
  5. Common Beginner Mistakes
  6. Best Practices
  7. Mini Challenge
  8. Practice Questions
  9. Practice Answers
  10. Key Takeaways

Lecture 001 — What Is Machine Learning? Types of ML

Category1 — ML Foundations
Lecture001 of 011
Estimated video length18 min
TargetPython 3
LevelBeginner

Machine learning is a branch of AI where a system learns patterns from data and improves with experience, instead of being explicitly programmed with rules for every situation. Before any code, this lecture sorts ML into the handful of categories everything else in the course will slot into.

Contents

Prerequisites · Connection · Objectives · Lesson · Common Mistakes · Best Practices · Mini Challenge · Practice Questions · Answers · Takeaways


Prerequisites

  • None — this is the first lecture of the course.

Connection With Previous Lectures

None yet. Every later lecture in this course refers back to the five categories introduced here — most of all supervised and unsupervised learning, which cover almost everything through Lecture 009.


Learning Objectives

By the end of this lecture you will be able to:

  • Give a plain-English definition of machine learning
  • Name the five categories of ML and what separates them
  • Say, for a given problem, which category it most likely falls under

Lesson

The Core Idea

Traditional software runs rules a programmer wrote by hand. Machine learning flips that: you give the system examples, and it works out the rules (really, a mathematical function) that fit those examples — then applies that function to new, unseen inputs. The main way to sort ML approaches is by how much supervision (labeled data) the learning process gets.

Overview of ML types

Supervised Learning

The model trains on a labeled dataset — every input example comes with the correct output — and learns to map new inputs to outputs.

  • Classification predicts a category (e.g., spam vs. not spam). Algorithms: logistic regression, decision trees, random forests, KNN, Naive Bayes, SVM.
  • Regression predicts a continuous number (e.g., house price). Algorithms: linear/polynomial/ridge/lasso regression, decision trees, random forests.
  • Common uses: image/speech/text processing, forecasting, recommendations, healthcare, finance.
Supervised learning

Unsupervised Learning

The model works with unlabeled data and finds hidden structure on its own.

  • Clustering groups similar points (K-Means, DBSCAN, Mean-shift).
  • Dimensionality reduction simplifies data while preserving key information (PCA, ICA).
  • Association rule learning finds "if X then Y" rules (Apriori, FP-Growth, Eclat).
  • Common uses: customer segmentation, anomaly detection, exploratory data analysis.
Unsupervised learning

Reinforcement Learning

An agent learns through trial and error by interacting with an environment, receiving rewards or penalties for its actions, with the goal of maximizing long-term reward (not immediate accuracy). Algorithms: Q-learning, SARSA, deep Q-learning. Used in games, robotics, self-driving cars, trading.

Reinforcement learning agent

Semi-Supervised & Self-Supervised Learning (bonus)

Semi-supervised learning combines a small labeled dataset with a large unlabeled one — useful when labeling is expensive (e.g., medical imaging). Self-supervised learning has models generate their own labels from the raw data itself (e.g., predicting a masked word) — this is how most modern large language models are pretrained.

Semi-supervised learning

Teaching point: the same algorithm (e.g., decision trees, random forests) can show up under multiple learning paradigms — it's the learning setup (labels available or not, reward signal or not) that defines the category, not the algorithm name.


Common Beginner Mistakes

1. Treating "ML" as one single technique — it's an umbrella term for several distinct learning setups that need different data and solve different kinds of problems.

2. Mixing up classification and regression — both are supervised, but one predicts a category, the other a number. This distinction resurfaces in every later algorithm lecture.

3. Assuming unsupervised learning is "worse" because it has no labels — it solves a different problem (finding structure) rather than a lesser version of the same problem.


Best Practices

  • Before picking an algorithm, first ask: do I have labeled data? That alone narrows the field to supervised vs. unsupervised.
  • Keep the five categories in mind as a checklist when scoping a new ML problem.

Mini Challenge

For each of these, name the ML category it belongs to: (a) grouping customers by purchase behavior with no predefined groups, (b) predicting tomorrow's temperature from historical weather data, (c) training a game-playing agent that only gets a score at the end of a match.


Practice Questions

  1. What is the key difference between supervised and unsupervised learning?
  2. What two problem types fall under supervised learning?
  3. What does an RL agent optimize for, and how is that different from accuracy?
  4. Give one example use case each for semi-supervised and self-supervised learning.

Practice Answers

  1. Supervised learning trains on labeled data (inputs with known correct outputs); unsupervised learning works on unlabeled data and finds structure on its own.
  2. Classification (predicting a category) and regression (predicting a continuous number).
  3. Long-term cumulative reward from the environment, not per-example correctness.
  4. Semi-supervised: medical image diagnosis (few labeled scans, many unlabeled ones). Self-supervised: pretraining a language model by predicting masked/next words.

Key Takeaways

  • ML systems learn a function from examples instead of following hand-written rules
  • Five categories: supervised, unsupervised, reinforcement, semi-supervised, self-supervised
  • Supervised splits further into classification (category) and regression (number)
  • The learning setup — not the algorithm — defines the category