Stanford University · on Stanford Online

CS229: Machine Learning

4.9(11,000) on Stanford Online·2M enrolled
Advanced 55 hours EnglishFREE
SkillsMachine learning theorySupervised learningUnsupervised learningLearning theoryOptimisationProbabilityLinear algebra

Is this course right for you?

Our take
Worth it if you have the math and want to understand machine learning at the level where you could read the papers, not just call a library. The lectures and notes are free.

Good for: learners with strong math who want the theory behind ML, not just how to call a library.

Skip if: you are new to machine learning, or you want an applied, code-first course.

This is the theory-first original that Ng's gentler Coursera courses were built from. You work through the actual derivations and proofs, which is exactly what people heading into research or wanting to know why a method works are after. The trade-off is that it is genuinely demanding and assumes real comfort with probability and linear algebra.

The free version gives you lectures and notes but no graded assignments, no feedback and no certificate, so you supply the discipline. The recordings are from 2018 and pre-date the current wave of transformer and LLM work, though the fundamentals it teaches still underpin all of it. Pair it with a hands-on course if you also want to build.

Comparison · LBS

Compare alternatives for CS229: Machine Learning

Same topic, different options. We surface the trade-offs others hide so you can pick the course that actually fits your time, budget, and goals.
Stanford Online4.9(11,000)
CS229: Machine Learning
Price
Free
Free lecture materials available online
Duration
55 hrs
Level
Advanced
Certificate
Coursera4.8(14,000)
Google Advanced Data Analytics Professional Certificate
Price
Free
Audit free · Certificate on subscription
Duration
197 hrs
Level
Intermediate
Certificate
Professional Certificate
Coursera4.9(39,000)
Machine Learning Specialization
Price
Free
Audit free · Certificate on subscription
Duration
86 hrs
Level
Intermediate
Certificate
Specialization
Google4.7(8,500)
Machine Learning Crash Course
Price
Free
Completely free, self-paced
Duration
15 hrs
Level
Beginner
Certificate
Prices & availability can change — confirm on the provider's site. We're not affiliated with any single provider.

About this course

CS229 is Andrew Ng's graduate-level Stanford ML course — the academic original that preceded his Coursera courses and goes significantly deeper into the mathematical foundations. Where the Coursera ML Specialization builds intuition and implements in Python, CS229 works through full probabilistic derivations and proofs: maximum likelihood estimation for supervised learning, EM algorithm for unsupervised learning, support vector machines and kernels, principal component analysis, reinforcement learning with MDPs and Q-learning, and the theoretical foundations of learning guarantees.

Instructor

AN
Andrew Ng
Stanford Online instructor
2M+ learners8 courses4.9 instructor rating

Taught by Andrew Ng, Stanford Professor and founder of DeepLearning.AI, in the graduate-level version that preceded his Coursera courses.

Frequently asked questions

The popular choice is the Autumn 2018 lectures with Andrew Ng, freely on YouTube. There's also a 2019 version by Anand Avati and an older 2008 recording on Stanford Engineering Everywhere. The 2018 Ng playlist is the usual recommendation — recent enough and taught by the field's best-known instructor.

It's demanding: you'll want solid linear algebra, probability and statistics, and comfortable programming in Python with NumPy; multivariable calculus helps too. This isn't a gentle first ML course — the maths is load-bearing, and without it the derivations will lose you quickly.

CS229 is deliberately maths-heavy: the lectures are about why algorithms work, with derivations and proofs, and the assignments involve coding but aren't the focus. If you want a code-first, applied course, this isn't it on its own — pair it with an applied course for the hands-on side, and take CS229 for the depth underneath.

Same instructor, very different level. The Coursera Machine Learning course is the accessible, maths-light version for a broad audience; CS229 is the actual Stanford graduate-level course, with the full mathematics the Coursera one deliberately skips. Do Coursera for intuition, CS229 when you want to understand it properly.
Free
to audit
Enroll now