• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 11 páginas
Examen

CS229 Machine Learning Study Guide | Stanford ML Exam Prep PDF

Document preview thumbnail
Vista previa 2 fuera de 11 páginas

Master Stanford's CS229 Machine Learning with this comprehensive intermediate-level study guide PDF. Perfect for college students preparing for ML exams, this digital download covers all four core pillars of Stanford's renowned CS229 course: supervised learning, learning theory, unsupervised learning, and neural networks.

Vista previa del contenido

CS229 Machine Learning — Study Guide 1




CS229 Machine Learning
Study Guide
Intermediate Level • Stanford CS229 Core Topics




This guide consolidates the four core pillars of Stanford’s CS229: supervised learning, learning
theory, unsupervised learning, and neural networks. It assumes comfort with linear algebra
(matrix operations, eigendecomposition), multivariable calculus (gradients, Hessians), and basic
probability (Gaussians, Bayes’ rule). Each section ends with a practice problem; complete
solutions are provided in the final section so you can attempt each problem before checking your
work. Read actively — re-derive every gradient and re-sketch every model.


Contents

1 Linear Regression & Least Squares 2

2 Logistic Regression & Generalized Linear Models 3

3 Generative Models: GDA & Naive Bayes 4

4 Support Vector Machines & Kernels 4

5 Learning Theory 5

6 Unsupervised Learning 6

7 Neural Networks & Backpropagation 7

8 Solutions to Practice Problems 9

9 Summary & Further Reading 11

, CS229 Machine Learning — Study Guide 2



1. Linear Regression & Least Squares

Linear regression is the foundation of supervised learning: predict a real-valued output y ∈ R
as a linear function of features x ∈ Rn. The hypothesis is
n
Σ
hθ(x) = θ ⊤x = θjxj,
j=0

where we append a bias feature x0 = 1. Given a training set {(x(i), y(i))}mi=1 , we choose θ to
minimize the squared-error cost
m
1Σ 2
J(θ) = hθ (x(i)) − y(i) .
2
i=1


Gradient descent updates θj := θj − α ∂J∂θ,j where for a single example

∂J
= h θ(x) − y xj .
∂θj

This is the LMS (least-mean-squares) update. The update is proportional to the error (hθ(x)−y),
which gives the algorithm its self-correcting character.
Batch gradient descent sums the gradient over all m examples; stochastic gradient descent
(SGD) updates after each example, which is cheaper and often faster on large datasets. The
learning rate α controls step size — too small and convergence is slow; too large and the cost
may diverge.
The normal equations give the closed-form minimizer. Stacking the data into a design matrix
⊤
X ∈ Rm×(n+1) (rows are x(i) ) and label vector y ∈ Rm, the optimal θ satisfies

∇θJ = X⊤(Xθ − y) = 0 =⇒ θ = (X⊤X)−1X⊤y.

This is the maximum-likelihood estimator under Gaussian noise y(i) | x(i) ∼ N (θ⊤x(i), σ2).
Key formula: normal equations



Closed-form least-squares solution. Requires X⊤X to be invertible (features linearly inde-


Worked mini-example. Two points: (x, y) = (1, 2), (2, 4), with bias feature. Then X =
1 1 2 3 5 −3
, y = 24 . Compute X⊤X = , X⊤y = 610 . Inverse of X⊤X is (det
1 2 3 5 −3 2
5·6−3·10
= 1), giving θ = −3·6+2·10 = 20 . So the line is h(x) = 0 + 2x = 2x, exactly fitting both points.

Practice Problem 1


{(1, 3), (2, 5), (3, 7)}. Compute the least-squares parameter vector θ (θ0, θ1) using the
normal equations. Verify that the residuals are zero.

Información del documento

Subido en
4 de noviembre de 2026
Número de páginas
11
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$14.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Lectgrayson
3.9
(18)
Vendido
155
Seguidores
5
Artículos
2585
Última venta
2 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes