Course Description This course provides a broad introduction to machine learning
and statistical pattern recognition. Topics include: supervised learning (generative/discriminative learning,
parametric/non-parametric learning, neural networks, support vector machines); unsupervised learning
(clustering, dimensionality reduction, kernel methods); learning theory (bias/variance tradeoffs, practical
advice); reinforcement learning and adaptive control. The course will also discuss recent applications of
machine learning, such as to robotic control, data mining, autonomous navigation, bioinformatics, speech
recognition, and text and web data processing.
04/03/20 We are currently updating this website for the Spring 2020 version of the course.
This annoucement will be removed once we are finished. Stay tuned!
04/03/20 Welcome to CS229! We are excited to get the class started on Monday 4/06 at 4:30pm
PST. Because of the ongoing COVID-19 pandemic, this class will be taught entirely online. Links to lectures
can be found on Canvas.
Time and Location
MW 4:30pm - 5:50pm PST. The class will be taught online. Links to lectures are on Canvas under Zoom.
Contact and Communication
Due to a large number of inquiries, we encourage you to read the logistic section below and the FAQ page for commonly asked questions first,
before reaching out to the course staff.
All official announcements and communication will happen over Piazza.
Any questions regarding course content and course organization should be posted on Piazza. You are
strongly encouraged to answer other students' questions when you know the answer.
If there are private matters specific to you (e.g special accommodations, requesting alternative
arrangements etc.), please create a private post on Piazza.
For longer discussions with TAs, please attend office hours.
TA office hours and the course calendar can be found here.
Before the beginning of the course, please contact the course coordinator
Swati Dube Batra
for logistical questions (ideally after consulting the FAQ page)
Students are expected to have the following background:
Knowledge of basic computer science principles and skills, at a level sufficient to write a reasonably
non-trivial computer program in Python/numpy.
Familiarity with probability theory (CS 109 or STATS 116)
Familiarity with multivariable calculus and linear algebra (relevant classes incldue, but not limited
to MATH 51, MATH 104, MATH 113, CS 205, CME 100, CME 103)
Optional Friday Lectures
To review material from the prerequisites or to supplement the lecture material, additional lectures will be
held every Friday at 4:30pm - 5:50pm PST (weeks 1-9). Links to the lectures will be on Canvas. Attendance to
these lectures is optional, but encouraged.
Optional Discussion Sections
In addition to the regular lectures and optional Friday lecture, there will also be optional weekly
discussion sections led by TAs.
These sessions are meant to be interactive and in a small, traditional classroom setting.
They will largely involve working through problems that are similar to the homeworks.
Discussion sections will be held on Thursdays at 10:30am - 11:50am PST, as well as 1:30pm - 2:50pm PST.
Links to these discussion sections will be on Canvas.
There is no required text for this course. Notes will be posted periodically on the class syllabus.
There will be four written homeworks, one midterm, and an optional major open-ended term
project (see the projects page for details). The assignments will contain
written questions and questions that require some Python programming. In the term project, you will
investigate some interesting aspect of machine learning or apply machine learning to a problem that
We try very hard to make questions unambiguous, but some ambiguities may remain. Ask if confused or state
your assumptions explicitly. Reasonable assumptions will be accepted in case of ambiguous questions.
Course grades: if you elect to not do the term project, then your grade will be based 66.67% on
homeworks (distributed evenly between the four assignments) and 33.33% on the midterm. If you elect
to do the term project, then your grade will be based 40% on homeworks (10% each), 20% on the
midterm, and 40% on the term project. However, if you submit a term project, we will calculate your
grade both ways, and you will receive the higher score. Note: as per University rules, all students
will be graded on a S/NC basis this quarter. However, we will still keep track of percentage grades for
those students that request it for outside purposes (scholarships, reimbursements etc).
Assignments will be submitted through Gradescope. You will receive
an invite to Gradescope for CS229 Machine Learning Spring 2020. If you have not received an invite email
after the first few days of class, first log in to Gradescope with your @stanford.edu email and see whether
you find the course listed, if not please post a private message on Piazza for us to add you.
This quarter, students are allowed to submit in pairs. If you do so, make sure both names are attached to
the Gradescope submission.
Each student will have a total of eight free late (calendar) days to use for homeworks, project
proposals and project milestones.
Once these late days are exhausted, any assignments turned in late will be penalized 20% per late day.
However, no assignment will be accepted more than three days after its due date, and late days cannot
be used for the final project poster or write-up.
Each 24 hours or part thereof that a homework is late uses up one full late day. Please note that late days
are applied individually. If an assignment is submitted late, then each student in the submission is docked
the corresponding number of late days (for example, if an assignment is submitted 5 hours late, each student
will be docked 1 late day).
We strongly encourage students to form study groups. Students may discuss and work on homework problems
in groups. However, each student must write down the solution independently, and without referring to
written notes from the joint session. Students submitting in a pair act as one unit - they may share
resources (such as notes) with each other and write the solutions together. Note that both of the two
students should fully understand all the answers in their submission, even though only one of them needs
to write up a solution to a question. In other words, each student must understand the solution well
in order to reconstruct it by him/herself. In addition, each student should write on the problem
set the set of people with whom s/he collaborated.
Further, since we occasionally reuse problem set questions from previous years, we expect students not to
copy, refer to, or look at the solutions in preparing their answers. It is an honor code violation to
intentionally refer to a previous year's solutions. This applies both to the official solutions and
to solutions that you or someone else may have written up in a previous year.
Lecture Video Policy
All lectures this quarter will be recorded on Zoom.
For your convenience, you can access these recordings by logging into the course Canvas site.
These recordings might be reused in other Stanford courses, viewed by other Stanford students, faculty, or
staff, or used for other education and research purposes.
Note that while the cameras are positioned with the intention of recording only the instructor, occasionally
part of your image or voice might be incidentally captured.
If you have questions, please contact a member of the teaching team.
We highly encourage you to attend these zoom lectures as we hope to make them interactive and students can
ask their questions through the zoom chat function.
Zoom Office Hours and Queue Status
We will be using QueueStatus and Zoom to hold remote office hours this quarter. After putting your name in
queue (can be found here), please watch for messages from
TAs on QueueStatus. Each TA will have their own Zoom meeting, and will message you when it is your turn. If
there are several people in the queue, we will ask that everyone who has the same question also join the
meeting, so we can process people in parallel.
If you are a current Stanford student or a staff member, you may request to audit the course. Please fill
this form here, we will review all the audit requests on
1st day of the classes and add you to the course’s Canvas page. Please note, Auditors do not get access to
Piazza and student Slack group. Also, please note, as an auditor, you cannot submit the assignments on
Gradescope and you will not be graded.
Incomplete Requests from Previous Quarter
If you have an Incomplete from previous quarter and you wish to complete the course this quarter, please
that since this time, we are making the final project optional, you are not required to submit a project. In
that case, we calculate your grade based on your performance in assignments and midterm.
Contact one of the instructors/TAs to notify us that you would like to complete CS229 this quarter.