In order to get the most out of CS109A, knowledge of multivariate calculus, probability theory, statistics, and some basic linear algebra (e.g., matrix operations, eigenvectors, etc.) is suggested.  Below are some resources for self-assessment and review:

Here is a useful textbook for reviewing many of the above topics: Mathematics for Machine Learning

Note: you can be successful in the course (assignments, quizzes, etc.) with the listed pre-requisites, but some of the material presented in lectures may be more easily understood with more background.

TThis course dives right into core Machine Learning topics. For this, students are expected to be fluent in Python programming. You can familiarize yourself with Python by completing online tutorials. Additionally, there are free Basics Python courses that cover all necessary python topics. You are also expected to be able to manipulate data using pandas DataFrames, perform basic operations with numpy arrays, and make use of basic plotting functions (e.g. line chart, histogram, scatter plot, bar chart) from matplotlib.

Python basics

Throughout this course, we will be using Python as our primary programming language for exercises, labs, and homework. Thus, you must have basic Python programming knowledge. The following are the topics you need to cross off your checklist before the course begins:

Variables, Datatypes, strings, file operations, Data structures such as lists, dictionaries, tuples and classes.

Pandas Basics

Most of the exercises you will encounter in this course exploit various datasets. Pandas is an open-source data analysis and manipulation tool, built on top of Python. In this course, we have provided the necessary support material and resources to work with Pandas. However, it is highly recommended that you get yourselves familiar with basic data manipulation using Pandas to ensure a smooth learning experience.

Numpy Basics

NumPy is a library for the Python programming language that provides support for large, multi-dimensional arrays and matrices and a large collection of high-level mathematical functions to operate on these data structures. Because of the extensive exercises provided in this course, it is important to use Numpy for efficient problem-solving to get identical results. Though this course aims to support individuals with no prior Numpy knowledge, you must go through the basics of this library to avoid any possible hiccups.

Matplotlib Basics

A large portion of this course uses different graphs and charts to explain topics and validate results. Matplotlib is a plotting library for Python. This library has been used to create all the graphs you will see throughout the course. Additionally, the exercises and homeworks are structured in a manner that integrates this library. Henceforth, it is highly recommended to get yourselves acquainted with Matplotlib Basics.

For this course, we will be using Jupyter Notebooks. You can familiarize yourself with Jupyter notebooks by reading the following tutorials:

A Beginner’s Tutorial to Jupyter Notebooks

Finally, we assume that students have a strong foundation in calculus, linear algebra, statistics, and probability. You should review these concepts before the course begins. Here is one useful resource:

Mathematics for Machine Learning


To make the most of this course, we highly recommend you follow the given guidelines:

Ensure you have a good internet connection. As the course is entirely online, you must have strong internet to avoid missing out on the lecture.

This course is designed to have healthy interactions to understand the material. Hence, it is vital to have a good audio system. You should be able to listen to lectures as well as respond to questions during one. It is highly recommended that each of you have your video turned on during the lectures. Make sure your face is clearly visible with ambient lighting.

Before each lecture, ensure you have a programming ready device. You should be able to write and execute code during the lecture. Additionally, make sure your device settings allow screen sharing.

Consistency is key. Attend all the lectures, sections and office hours (if needed). Make sure you are on time for all of them.

If possible, please try to avoid the use of mobile phones to attend lectures.

More info can be found here.