Mathematics behind Machine Learning – The Core Concepts you Need to Know

Well, that’s what we will learn in this article.

We’ll discuss the various mathematical aspects you need to know to become a machine learning master, including linear algebra, probability, and more.

  Table of Contents In this article, we will discuss the below topics: Difference between the Mathematics Behind Machine Learning and Data Science Attitude adjustment for approaching a former enemy Linear Algebra for Machine Learning Multivariate Calculus for Machine Learning Probability for Machine Learning Statistics for Machine Learning So without further ado, let’s dive right into it.

  Difference Between the Mathematics Behind Machine Learning and Data Science One of the most common questions I’m regularly asked by aspiring data scientists is – what’s the different between data science and machine learning?.And more to the point, what’s the difference between the mathematics behind these two?.I regularly encounter these questions: Where do I use probability in Machine Learning?.Where do I use Multivariate Calculus in Data Science?.Where do I use Linear Algebra in Data Science?.Although Data Science and Machine Learning share a lot of common ground, there are subtle differences in their focus on mathematics.

The below radar plot encapsulates my point: Yes, Data Science and Machine Learning overlap a lot but they differ quite a bit in their primary focus.

And this subtle difference is often the source of the questions I mentioned above.

In Data Science, our primary goal is to explore and analyse the data, generate hypotheses and test them.

These are often the steps to draw out the hidden inferences in the data which might not observable at first sight.

As a result, we have to rigorously rely on the concepts of statistics and probability to compare and conduct hypothesis testing.

On the other hand, Machine learning focuses more on the concepts of Linear Algebra as it serves as the main stage for all the complex processes to take place (besides the efficiency aspect).

On the other hand, multivariate calculus deals with the aspect of numerical optimisation, which is the driving force behind most machine learning algorithms.

Data science is generally considered as the prerequisite to machine learning.

Think about it – we expect the input data for machine learning algorithms to be clean and prepared with respect to the technique we use.

If you are among the ones who are looking to work end-to-end (Data Science + Machine Learning), it will be better to make yourself proficient with the union of the math required for Data Science and Machine Learning.

  Attitude Adjustment for Approaching a Former Enemy If you keep repeating the same thing thing that you’ve done in the past, you will get the results you have always been getting.

I’m paraphrasing Albert Einstein’s famous quote here but I’m sure you get the idea!.Many machine learning aspirants make this mistake of following the same methodology as they did during their school days.

This means using a pen and paper to grind through the theorems, derivations and questions.

This traditional methodology can’t be any farther from what we want to be following, unless you want to be in a 17th century battle of mathematicians.

They challenged each other over a set number of mathematically intriguing questions to be solved by the next day.

It sounds glorious but as you can imagine, it’s not the best way to learn a new concept in the 21st century.

So how can you learn mathematics without getting bogged down into the theory?.Mathematics in data science and machine learning is not about crunching numbers, but about what is happening, why it’s happening, and how we can play around with different things to obtain the results we want.

In essence: We should be more concerned about the intuition and the geometric interpretation of any given expression: This helps us interpret the meaning behind these mind boggling expressions.

All the laborious work of manually working through the problems is not essential, and does not require skill.

Working through them using computational libraries like NumPy makes much more sense instead of testing your stamina.

Now, let’s shift our focus to understand why we need to learn these different tributaries of mathematics and what would be a good source to learn it the intuitive way.

  Linear Algebra for Machine Learning Some people consider linear algebra to be the mathematics of the 21st century.

I can see the sense in that – linear algebra is the backbone of machine learning and data science which are set to revolutionise every other industry in the coming years.

As I have already discussed before, linear algebra acts as a stage or a platform over which all the machine learning algorithms cook their results.

But why linear algebra?.Linear Algebra acts as the systematic basis of the representation for simultaneous linear equations.

Let’s say we are given two linear equations: Solving for x and y is pretty easy, right?.We can do it by simply multiplying equation 1 by -2 and  then adding both: As a result, the variable x is eliminated and y is obtained as -9.

On back substituting we get the value of x as 36.

The problem here is that this operation requires human intuition to work.

Our machines cannot mimic the same intuition.

They can only understand data in a certain representation and rules in a set format.

Now, to establish an analogy with data science or machine learning, each equation represents a single observation from the dataset.

The left-hand side represents the independent input variables and the right-hand side represents the target dependent variable.

Datasets often contain hundreds and thousands of observations (if not millions), not to mention that there can be a lot of variables to work with.

 So do you think we can work through the datasets and find the optimum value of x and y manually?.Absolutely not!.We would definitely prefer automation for this task.

And this is where Linear Algebra comes into play.

In a broad sense: Linear algebra is a systematic representation of the knowledge that a computer can understand and all the operations in linear algebra are systematic rules.

This is the algebraic representation of the problem we solved above.

Using the matrix operations (set of rules), we can solve for the values of x and y in the blink of an eye.

This is the primary reason linear algebra is a necessity in data science and machine learning.

To learn linear algebra using the classic intuition and some rigorous practice, you cannot go wrong with the lectures of Professor Gilbert Strang from MIT: But if you are more of the quick intuition and visualisation type of person, then you’ll love the below series of videos:   Multivariate Calculus for Machine Learning Most aspiring data science and machine learning professionals often fail to explain where they need to use multivariate calculus.

As I mentioned at the start of the article, this is unfortunately an all too common experience.

If you immediately said Gradient Descent, you’re on the right path!. More details

Leave a Reply