# What is the Best Math Course for Machine Learning

Learning the required mathematics is often perceived as one of the biggest obstacles by people trying to get started in machine learning. Mathematical concepts from linear algebra, statistics, and calculus are foundational to many machine learning algorithms.

Luckily, the past several years have seen the proliferation of several online courses and other learning resources. Thus, mastering the mathematical prerequisites has become a lot easier, especially for self-learners. Now the question is not so much how to learn the requisite math, but what course should I choose to do so?

This post is designed to help you understand what to look out for when picking a good math course and how to choose the best course for your requirements. In the course of this article, I will recommend and briefly review three online courses that I found most valuable for getting the mathematical foundation in place. With two of these three courses (Coursera specializations), you should learn all the math you need for a successful career in machine learning.

If you don’t want to read through the whole article and just want a recommendation for the best math courses, here’s the takeaway:

The best math course in my opinion is the “Mathematics for Machine Learning” specialization on Coursera. It has the right combination of breadth and depth while still being accessible to an audience who hasn’t studied math beyond high school. It also isn’t too long. Within 3-6 months you should be able to get the mathematical foundations you need to successfully understand machine learning algorithms. It doesn’t cover statistics in sufficient depth, though. To get a good grounding in statistics with a sufficient amount of programming practice, I recommend taking the “Statistics With Python” specialization. To get the best learning experience, take the first two courses of the “Mathematics for Machine Learning” specialization followed by the “Statistics with Python” Specialization. Optionally, you can then still take the third course from the “Mathematics for Machine Learning” specialization on principal components analysis.

## What to Look Out For in a Great Math For Machine Learning Course?

Structurally, a good math for machine learning course should offer a good balance between theory and practice. When it comes to understanding abstract mathematical concepts, most people will not benefit from hours of passively listening to lectures. A teacher can explain something in 10 minutes, but it may take significantly longer for the listeners to process what has been said. And you probably won’t internalize and really understand it unless you’ve had to actively solve a problem involving those concepts.

Most people who learn math for machine learning want to become productive machine learning engineers and data scientists as quickly as possible. You probably don’t want to spend years building mathematical foundations before you even get started with machine learning. Accordingly, a course should focus on the essentials that are necessary to hit the ground running. Naturally, everyone learns differently. But as a rule of thumb, a good course should be able to convey the mathematical essentials necessary to become a productive machine learning engineer within 3-6 months of focused part-time study.

### Course Structure

Therefore, lectures should be kept short and to the point. As a rule of thumb, I’d say a lecture video shouldn’t be longer than 15 minutes. If the concept is too complicated to fully explain in 15 minutes, a good instructor would break it down into smaller chunks across multiple videos.

After 2-3 videos, I’d expect some hands-on practice in the form of problems to solve with pen and paper. Every large conceptual block should be followed by a hands-on programming assignment that auto grades your results. Stay away from courses that only offer peer grading as this is ineffective for math courses. You want your mistakes to be detected by an algorithm or by a professional in the field, not by a peer who is as much a beginner as you are.

### Linear Algebra

In terms of content, you want to look for courses that have linear algebra as a major building block. Machine learning heavily leans on matrices and vector operations. Accordingly, matrix multiplication and dot products should definitely be part of the course. The course should also contain a discussion of special matrix forms like inverse and identity matrices, transposes, and basis changes. Lastly, I’d also like to see a discussion of Eigenvectors, Eigenvalues, and data processing reduction techniques such as the Singular Value Decomposition.

### Statistics

I’d like to see an introduction to basic probability concepts including random variables, probability mass, and probability density functions, conditional probability and Bayes’ theorem.

Furthermore, the course should build an understanding of expected values, variance, covariance, and correlation. It should also familiarize you with common statistical distributions. The most important distributions to understand are the normal distribution and the Binomial distribution.

Lastly, the concept of likelihood and its difference from probability is also vital to understand.

### Calculus

Calculus is important once you get into more advanced machine learning concepts. Differential calculus is necessary to understand how neural networks backpropagate information. Machine learning relies on probability distributions to model the distribution of data. Integral calculus is necessary to calculate the expected value of continuous data distributions.

A good course should therefore cover first and second-order derivatives in matrix form as well as basic integration. I’d also like to see practical applications to backpropagation and gradient descent.

While calculus is very helpful, you can become a successful applied machine learning engineer without knowing more about it than what you’ve learned in high-school. Linear Algebra and statistics are the two main mathematical pillar that carry machine learning. Calculus is like the third pillar in the middle that reinforces the foundations but is not strictly necessary.

## Courses

### Mathematics for Machine Learning Specialization

The math for ML specialization on Coursera consists of 3 courses each of which is 4-6 weeks long. Each course contains several video lectures that are delivered in 5 -15 minute segments. This way, you don’t lose focus and motivation as easily as if you were sitting through hour-long lectures. The lectures are supplemented with quizzes that usually require you to solve a math problem with pen and paper. At the end of each week, you’ll find programming assignments that reinforce your understanding.

The first course focuses on Linear Algebra, while the second course is all about multivariable calculus. The last course focuses on principal components analysis, a data reduction technique that heavily relies on linear algebra and thus builds on the topics of the previous courses.

One drawback about the mathematics for machine learning specialization is that it doesn’t have a dedicated statistics course. While there are several great online statistics courses out there, having a dedicated statistics course would have made the mathematics for machine learning specialization the best and most complete resource for learning machine learning and data science math.

#### Advantages

- Short on-point lectures
- Hands-On Exercises
- Programming assignments
- Can be finished in 3-6 months

#### Disadvantages

- No dedicated course on probability and statistics

In summary, the mathematics for machine learning specialization comes with all the attributes that you would expect of a good math course. Lectures and the courses themselves are of reasonable length. The video lectures are supplemented with hands-on practice in the form of programming assignments and exercises.

**Statistics with Python Specialization**

Statistics with Python is a specialization that teaches you statistics through applied Python programming. It features short lectures followed by quizzes and programming labs. The focus is always on getting you to solve problems through Python. If you do not have a Python or even a programming background the course has a double benefit. It will help you develop coding skills while teaching you statistics.

The specialization consists of 3 courses that build on each other. The first course covers a lot of foundations such as different types of data and how to sample from that data, and how to manipulate, explore, and visualize it in Python. The second course goes more into statistical techniques such as significance testing, and confidence intervals. In the third course, you find an introduction to statistical models such as linear regression and logistic regression. This course is a great stepping stone to machine learning because you learn to build basic models in Python, which is also the main language used for building machine learning models.

#### Advantages

- Short on-point lectures
- Programming exercises
- Can be finished in 1-3 months

#### Disadvantages

- I can’t think of any. Overall it is a great statistics course

### Data Science Math Skills

Data science math skills is a very basic math course. It is only 4 weeks long and really designed for people who have forgotten most of the math they’ve learned in high school. The first weeks focus on mathematical notation and functions while the latter weeks familiarize you with logarithms and basic statistics. The course is split into several short video lectures so that you won’t feel overwhelmed. Each couple of videos is followed by a quiz that helps reinforce the concepts you’ve learned. Unfortunately, there are no programming assignments.

#### Advantages

- Short on-point lectures
- Hands-On Exercises
- Can be finished in 1 month

#### Disadvantages

- No programming assignments
- Very basic. Not enough depth.

I would call the course a stepping stone to a more in-depth machine learning math course.

The course is especially useful for building mathematical intuition. For example, an intuitive understanding of logarithms, exponentials, the cartesian coordinate system, and the rate of change helps tremendously in grasping non-linear functions, vector algebra, and calculus.

If you don’t have an intuitive understanding of these concepts, you would probably benefit from taking “Data Science Math Skills”.

## Summary

In summary, the “Mathematics for Machine Learning” specialization in combination with the “Statistics with Python” specialization should give you all the foundations you need to launch a successful career in applied machine learning. Optionally, take “Data Science Math Skills” before the two other specializations if you feel that your math is really rusty or that you generally lack mathematical intuition.