Seyed Masoud Hosseini · Overview · Study log · Ideas · Transcript · RSS feed

Machine Learning · Lecture 1 of 21 · 1:15:20

Lecture 1: Course Overview and What Machine Learning Is

Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018) on YouTube

Study guide

What this lecture covers

This opening lecture of Stanford's CS229 has two halves. The first covers course logistics: prerequisites, grading, the class project, and the Honor Code. The second is a broad tour of what machine learning is and the major categories of algorithms the course will teach, illustrated with demo videos of a self-driving car, unsupervised clustering, and a reinforcement-learning helicopter.

There is no technical prerequisite for this lecture beyond curiosity; it sets up the vocabulary and course structure that later lectures build on. After watching, you should be able to describe the difference between supervised, unsupervised, and reinforcement learning, and know what CS229 expects from you as a student.

Key ideas

  • Supervised learning: learning a mapping from inputs X to labels Y using a dataset where both are given, such as predicting house price from house size.
  • Regression vs. classification: regression predicts a continuous value (like price); classification predicts a discrete value (like malignant/benign).
  • Unsupervised learning: finding structure in data that has inputs X but no labels, such as clustering similar data points together.
  • Reinforcement learning: learning behavior through a reward signal rather than labeled examples, illustrated by training a helicopter to fly.
  • Well-posed learning problem (Tom Mitchell's definition): a program learns from experience E with respect to task T and performance measure P if its performance on T, measured by P, improves with E.
  • Machine learning strategy: being systematic about decisions such as collecting more data versus changing the algorithm, rather than treating debugging models as guesswork.

Walkthrough

Course logistics and expectations (5:07)

Andrew Ng introduces the teaching team and explains the course's scale before covering prerequisites: basic computer science (Big O, data structures), probability (random variables, expectation, variance), and linear algebra (matrices, vectors, eigenvectors). He notes that programming assignments are moving from MATLAB/Octave to Python and NumPy this year. He explains the Honor Code: study groups and discussion are encouraged, but each student must write up their own homework solutions independently afterward. He also describes the class project, done individually or in groups of up to three (four in exceptional cases with a stricter grading bar), and points students to prior years' projects on the course website for inspiration. Logistics close with notes on Piazza for questions, Gradescope for grading, weekly optional Friday discussion sections covering prerequisite and advanced material, and the shift from a timed midterm to a take-home midterm.

What machine learning means (34:47)

Ng gives two classic definitions of machine learning. Arthur Samuel, who built a self-improving checkers program decades ago, defined it as "the field of study that gives computers the ability to learn without being explicitly programmed." Tom Mitchell's more formal definition frames it as a well-posed learning problem: a program learns from experience E with respect to a task T and a performance measure P if its performance on T, as measured by P, improves with E. Ng applies this to the checkers example, where E is games played against itself, T is playing checkers, and P is the win rate.

Supervised learning: regression and classification (40:00)

Using a housing-price example, Ng defines supervised learning as finding a mapping from inputs X (house size) to labels Y (price) by fitting a function, such as a line, to a labeled dataset. This is a regression problem because the output is continuous. He contrasts it with a breast-tumor classification example, where the goal is to predict a discrete label (malignant or benign) from features like tumor size, and later extends this to two features (size and age) to show how a line can separate two classes. He notes that real applications often use many more features than can be visualized, and previews the Support Vector Machine, which can effectively use an infinite number of features through a technique called kernels. The section closes with an old video from Carnegie Mellon showing a neural network trained by supervised learning (watching a human's steering choices) to drive a car, gradually mimicking the human's steering decisions as training with gradient descent and back-propagation reduces its error.

Machine learning strategy as an engineering discipline (58:19)

Ng argues that a major goal of the course is turning machine learning from "black magic, tribal knowledge" into a systematic engineering process. He describes visiting tech companies where teams spend months on approaches that were unlikely to work, and compares good machine learning practice to profiling code before optimizing it, rather than guessing at what to fix. This strategic skill, deciding whether to collect more data, change the algorithm, or adjust architecture, is treated in the course as its own subject, alongside deep learning.

Unsupervised learning (1:04:25)

Unsupervised learning works with unlabeled data, just X, to find interesting structure. Ng illustrates this with K-means clustering on a two-cluster dataset, Google News grouping articles about the same story, clustering genetic microarray data, organizing computing clusters, segmenting social networks or customer bases, and grouping galaxies in astronomical data. He also introduces the "cocktail party problem," separating overlapping voices recorded by multiple microphones using Independent Components Analysis, and mentions that unsupervised methods can learn word analogies (e.g., king is to queen as man is to woman) from unlabeled text.

Reinforcement learning (1:10:36)

Reinforcement learning is introduced through the problem of programming an autonomous helicopter, where no one knows the optimal control policy in advance. Ng compares it to training a dog: the system tries actions and receives a reward signal (roughly, "good" or "bad") rather than labeled examples, and over time learns to produce more of the rewarded behavior. He shows footage of a Stanford autonomous helicopter and a legged robot climbing obstacles, and notes that while reinforcement learning is best known for game-playing systems like AlphaGo, it is also gaining traction in robotics and logistics.

Before you watch

  • No prior CS229 lectures are required; this is the first lecture and mainly sets expectations.
  • A rough sense of what supervised versus unsupervised problems look like will help the logistics sections make more sense of why the course is structured around them.

Check your understanding

  1. What is the difference between a regression problem and a classification problem, in terms of the type of output Y?
  2. In Tom Mitchell's definition of a well-posed learning problem, what do E, T, and P represent for a checkers-playing program?
  3. Why is the cocktail-party problem considered unsupervised learning rather than supervised learning?
  4. How does the reward-signal idea in reinforcement learning differ from the labeled-example idea in supervised learning?

Chapters

From the YouTube description

For more information about Stanford’s Artificial Intelligence professional and graduate programs, visit: https://stanford.io/ai

Listen to the first lecture in Andrew Ng's machine learning course. This course provides a broad introduction to machine learning and statistical pattern recognition. Learn about both supervised and unsupervised learning as well as learning theory, reinforcement learning and control. Explore recent applications of machine learning and design and develop algorithms for machines.

Andrew Ng is an Adjunct Professor of Computer Science at Stanford University. View more about Andrew on his website: https://www.andrewng.org/

To follow along with the course schedule and syllabus, visit:
http://cs229.stanford.edu/syllabus-autumn2018.html

0:00 Introduction
05:21 Teaching team introductions
06:42 Goals for the course and the state of machine learning across research and industry
10:09 Prerequisites for the course
11:53 Homework, and a note about the Stanford honor code
16:57 Overview of the class project
25:57 Questions

#AndrewNg #machinelearning

Lecture 2: Linear Regression and Gradient Descent →