Syllabus


CS 136: Statistical Pattern Recognition (SPR)
Department of Computer Science, Tufts University
Class Meetings for Spring 2023: Mon and Wed 10:30 - 11:45am ET in JCC 180
Instructor: Mike Hughes, Assistant Professor of Computer Science
Grad TA: Xiaohui Chen, Ph.D. student, Tufts CS
Have questions? Need help?
  • Get rapid online help via our Piazza discussion forum
  • Get in-person help at regular Office Hours
  • For personal issues, email the instructor: mhughes(AT)cs.tufts.edu

Quick Links: [Prereqs] [Wait List] [In Class] [Homeworks] [Collaboration Policy] [Late Work Policy] [Grading Rubric]

Course Overview

This course provides the theoretical and computational foundations for probabilistic machine learning. The focus is on probabilistic models, which are especially useful for any application where observed data could be noisy, sometimes missing, or not available in large quantities. We emphasize representing uncertainty with formal distributions and trying to average over these distributions when making decisions (as done in the Bayesian approach).

We will study the following probabilistic models:

  • models for discrete data (e.g. next word prediction)
  • linear models for regression
  • generalized linear models for classification
  • mixture models
  • hidden Markov models for sequential data

We will try to understand all models through a unifying conceptual framework of directed graphical models.

Algorithms studied include:

  • sampling via Markov chain Monte Carlo methods
  • optimization via gradient descent (first-order and second-order)
  • optimization via coordinate descent, as in expectation maximization and variational inference

Objectives

After completing this course, students will be able to:

  • Demonstrate formal mathematical understanding of probabilistic models.
  • Given an applied data analysis task, select a relevant probabilistic model, fit the model on a relevant dataset using an appropriately chosen approximate inference method, and analyze the results.
  • Analyze numerical accuracy and stability of common probabilistic ML algorithms (e.g. avoiding overflow/underflow)
  • Analyze scalability considerations of common probabilistic ML methods (including runtime and memory complexity requirements).

Prerequisites

This course intends to provide students a solid foundation in statistical machine learning methods.

To achieve this objective, we expect students to be familiar with the following before taking the course:

  • Probability theory
    • e.g. you could explain the difference between a probability density function (PDF) and a cumulative distribution function (CDF)
  • Basic linear algebra (comfort with matrix/vector products; have seen inverses & determinants before)
    • e.g. you could write the closed-form solution of least squares linear regression using basic matrix operations (multiply, inverse)
  • First-order gradient-based optimization
    • e.g. you could code up a simple gradient descent procedure in Python to find the minimum of functions like f(x) = x^2
  • Basic supervised machine learning methods
    • e.g. you can describe the mathematical optimization problem that we solve to train linear regression and logistic regression
  • Coding in Python with modern open-source data science libraries
    • Basic array operations in numpy (computing inner products, inverting matrices, etc.)
    • Making basic plots or grids of plots in matplotlib
    • Training basic classifiers (like LogisticRegression) in scikit-learn

Practically, this means having successfully completed at least one and ideally both of these courses (or their equivalent outside of Tufts):

With instructor permission, diligent students who are lacking in a few of these areas of coursework could be able to catch-up on core concepts via self study and thus still be able to complete the course effectively. Please see the community-sourced Resources Page for a list of potentially useful resources for self-study.

Enrolling and Wait Lists

As of the start of semester, we expect to have about 40 students enrolled in the course. We are currently at capacity, but some students may drop the course and leave openings for others (usually we see 5-10 openings in the first week of classes as schedules shift).

Our top priority is to provide each enrolled student with our full support, including the ability to get prompt answers to questions on Piazza and in office hours as well as the ability to get high-quality feedback on submitted homeworks, exams, and projects in a timely manner.

We understand some students are on the wait list (either formally on the wait list on SIS system, or just conceptually would like to be in the course). It is possible that students currently on the wait list may be added, but only if there is adequate staff support.

Prof. Mike Hughes will make the final decision about all wait list candidates by end of day Mon 1/30, before the ADD deadline of 2/1.

To be considered for enrollment, you must do these two things:

  • Complete and submit HW0 by end of day Thu 1/26.
    • This action shows you have the necessary skills and would take the course seriously
  • Message the instructor by end of day Thu 1/26 via email with subject "CS 136 Wait List Request"
    • Explain your current state within your degree program (e.g. sophomore undergraduate in CS, Ph.D. student in Math)
    • Explain why taking the course this semester would be important to you.

Class Format for Spring 2023

The course is organized into 5 topical units (each 2-3 weeks long), which will govern in-class and out-of-class work.

Synchronous course meetings will be in-person throughout Spring 2023.

As of end of first day of class (Wed 1/30) we will expect students to be signed up on Piazza. This is how we will communicate any changes to the course meeting locations with you. If you have not heard otherwise, expect course meetings and office hours to be in person in their usual locations.

What will we do in class

Each synchronous class session will occur at the scheduled time (Mon and Wed from 1030-1145am ET).

Before each class, you are expected to complete on your own time all "Do Before Class" activities posted on that day's Schedule. These will include:

  • Watching video lectures (broken into 5-20 minute segments about a coherent topic)
  • Complete supplementary reading from the textbook or primary research literature
  • Download any relevant jupyter notebooks to prepare for in-class exercises

In class, we will typically have the following structure:

  • First 5 min.: Announcements: Instructor updates on course logistics.
  • Next 20 min.: Recap mini-lecture: Instructor recaps main ideas of the video lectures.
  • Next 30 min.: Small group breakouts: Interactive exercises to solidify concepts.
  • Last 20 min.: Flex time / Quiz: Instructor/TA available for on-demand questions. Exercises can continue if desired.

For the small-group breakouts, we will strive to create an exciting, interactive classroom, with lots of opportunities for students to ask questions and get feedback from the professor, TAs, and peers. Each student is responsible for shaping this environment: Please participate actively and respectfully! Show up regularly and get engaged.

Flex time is set aside specifically to acknowledge that in our flipped classroom model, you spend more time than usual outside of class preparing via readings and lectures. We will not require attendance or deliver new content in this time slot, but instead offer "office hours" like on-demand support at a time that is guaranteed available in most students' schedules.

Quiz time: Once at the end of each topical unit, we will have a short, in-class quiz instead of flex time. This quiz will verify your understanding of unit concepts (vast majority of questions will be math or conceptual questions, occasionally there might be a programming question). These quizzes are designed to be completable within about 15 minutes by adequately-prepared students.

What will we do outside of class?

Each of the 5 units will have the following assigned work outside of class:

  • 1 written homework (HW), to build math skills (derivation and analysis, resulting in a LaTeX typeset report)
  • 1 coding practical (CP), to build implementation skills (auto-graded Python exercises + a short report of figures and analysis)

Essentially, every Thursday there will be either a HW or a CP due (see Schedule).

For a complete list of graded assigned work, see the Assignments page.

Note that there is a special "first homework" (HW0) designed to make sure you have necessary prerequisite knowledge and that you become familiar with LaTeX for math report preparation.

Late work Policy

We want students to develop the skills of planning ahead and delivering work on time. To facilitate learning, we also want to be able to release solutions quickly and discuss recent assignments soon after deadlines. On the other hand, we know that this semester offers particular challenges, and we wish to be flexible and accommodating within reason.

With these goals in mind, we have the following policy:

Each student will have 240 total late hours (= 10 late days) to use throughout the semester across all homeworks and coding practicals.

For each individual assignment, you can submit beyond the posted deadline at most 96 hours (4 days) and still receive full credit. Thus, for one assignment due at Thu 11:59pm ET, you could submit by the following Mon at 11:59pm ET.

This late work deadline is key to our classroom goals. It allows us to always release homework solutions on Tuesday mornings several days before the required quiz on that unit is due, and lets us discuss the assignment in class soon after without issue.

The timestamp recorded on Gradescope will be official. Late time is rounded up to the nearest hour. For example, if the assignment is due at 3pm and you turn it in at 3:05pm, you have used one whole hour.

Beyond your allowance of 10 late days, zero credit will be awarded except in cases of truly unforeseen exceptional circumstances (e.g. family emergency, medical emergency). Students with exceptional circumstances should contact the instructor to make other arrangements as soon as possible.

Attendance

Participation in class is strongly encouraged, as you will get hands-on practice with material and have a chance to ask questions of the instructor and TAs, as well as your peers.

We only require attendance on designated quiz dates. Otherwise, we do not strictly require attendance at any class or track attendance.

Instructional material (readings, notes, and videos) will always be "prerecorded" and released on the Schedule page in advance, under "Do Before Class".

We will record video and audio for the main track of each interactive class session to capture important announcements and highlight key takeaways. We will strive to release that video within 24 hours on the Piazza resources page.

However, the most valuable learning interactions will occur in interactive breakout exercises, and those by design require synchronous participation.

Participation does factor in to a student's grade in two ways:

  • regular in-class engagements (being a memorable participant in 8 or more breakout sessions throughout the semester)
  • regular Piazza forum discussions (posting 8 or more times throughout the semester)

Exams

In Spring 2023, beyond the 5 unit-specific quizzes, there will be no required exams.

However, we will offer one optional exam (on the scheduled final exam date) as a way to allow students who missed or under-performed on a quiz for a particular unit a chance to improve their scores. Essentially, taking this exam can only improve your score.

Project

In the last month of the course, there will be an open-ended small project that allows you to apply and synthesize your knowledge about probabilistic modeling.

Students will work in pairs, and will gain practical experience in selecting, applying, evaluating and improving the models we study in this class in the context of a real dataset.

Workload

Each week, you should expect to spend about 8-12 hours on this class.

Here's our recommended break-down of how you'll spend time each week:

  • 1.75 hr / wk preparation before Mon class (reading, lecture videos)
  • 1.00 hr / wk active participation in Mon class (excludes flex time)
  • 1.75 hr / wk preparation before Wed class (reading, lecture videos)
  • 1.00 hr / wk active participation in Wed class (excludes flex time)
  • 4.00 hr / wk on HW or CP assignment (one assignment due each week, takes ~4 hr total)
  • 0.50 hr / wk preparing for and taking quiz (quizzes happen every few weeks, so get 0.5 hr prep plus 0.5 time taking the quiz)

This totals to ~10.00 hr / wk.

Grading

Final grades will be computed based on a numerical score via the following weighted average:

  • 25% homeworks (3% HW0, 4.4% each for HW1-HW5)
  • 22% coding practicals (4.4% each for CP1-CP5)
  • 36% short quizzes (one per unit, averaged after dropping the lowest quiz)
  • 15% project (including final report and intermediate checkpoint reports)
  • 2% participation in class and on Piazza discussion forum

When assigning grades given a final numerical score (from 0.0 to 1.0), the following scale will be used:

  • 0.94-1.00 : A
  • 0.90-0.94 : A-
  • 0.87-0.90 : B+
  • 0.83-0.87 : B
  • 0.80-0.83 : B-
  • 0.77-0.80 : C+
  • 0.73-0.77 : C
  • 0.70-0.73 : C-
  • 0.67-0.70 : D
  • 0.63-0.67 : D
  • 0.60-0.63 : D-
  • Below 0.60: F

The highest possible grade of "A+" will be awarded at the instructor's discretion.

We do not round up grades. This means you must earn at least an 0.83 (not 0.825 or 0.8295 or 0.8299) to earn a B.

Textbook

As a primary textbook, we will use "Pattern Recognition and Machine Learning" by Christopher M. Bishop.

A free PDF is available online from the author:

<https://www.microsoft.com/en-us/research/uploads/prod/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf>

Other suggested resources can be found on the Resources Page.

Collaboration Policy

Our ultimate goal is for each student to fully understand the course material. With this goal in mind, we have the following policy:

For quizzes, all work should be done individually, with no collaboration with others whatsoever.

For homeworks and coding practicals (HWs and CPs), we have the following policy for student work:

You must write the text of anything that will be turned in -- all code and all written solutions -- on your own without help from other human or artificial agents. You may not share any code or solutions with others, regardless of if they are enrolled in the class or not.

We do encourage high-level interaction with your classmates. After you have spent at least 10 minutes thinking about the problem on your own, you may verbally discuss assignments with others in the class. You may work out solutions together on whiteboards, laptops, or other media, but you are not allowed to take away any written or electronic information from joint work sessions with others. No notes, no diagrams, and no code. Emails, text messages, and other forms of virtual communication also constitute “notes” and should not be used preparing solutions.

When preparing your solutions, you may always consult textbooks, materials on the course website, or existing content on the web for general background knowledge. However, you cannot ask for answers through any question answering websites such as (but not limited to) Quora, StackOverflow, ChatGPT, etc. If you see any material having the same problem and providing a solution, you cannot check or copy the solution provided. If general-purpose material was helpful to you, please cite it in your solution within your "Collaboration Statement".

Collaboration Statement

At the top of every turned in homework (HW) and coding practical (CP), you must include the names of any people you worked with, and in what way you worked them (discussed ideas, debugged math, team coding). We may occasionally check in with groups to ascertain that everyone in the group was participating in accordance with this policy.

Academic Integrity Policy

This course will strictly follow the Academic Integrity Policy of Tufts University. Students are expected to finish course work independently when instructed, and to acknowledge all collaborators appropriately when group work is allowed. Submitted work should truthfully represent the time and effort applied.

Please refer to the Academic Integrity Policy at the following URL: https://students.tufts.edu/student-affairs/student-life-policies/academic-integrity-policy

Accessibility

Tufts and the instruction team of CS 136 strive to create a learning environment that is welcoming students of all backgrounds.

If you feel unwelcome for any reason, please talk to your instructor so we can work to make things better. If you feel uncomfortable talking to members of the teaching staff, consider reaching out to your academic advisor, the department chair, or your dean.

Please see the detailed accessibility policy at the following URL: <https://students.tufts.edu/student-accessibility-services>