All Data is the Same

February 9, 2020

In this brief post, I am going to discuss my motto, “all data is the same”. Many years ago, when I began making courses, I created this motto because I found that many beginner students didn’t understand the purpose or goal of a machine learning course.

They often assumed that a machine learning course should consist of 3 simple lines of Scikit-Learn code, applied to whatever data they happened to be interested in (so called “real-world” examples). Some examples might be: customer segmentation, fraud detection, disease prediction, etc. etc.

Problem: students are only interested in their own problems, not the problems of other students!

It is an inherently selfish desire, but furthermore, it’s a desire that can never be satisfied, because no two students are interested in the same “real-world” examples and applications.

You can’t do a biology example, because the finance students would not understand it. You can’t do a finance example, because the biology students would not understand it.

The goal isn’t to learn the finance part. The goal isn’t to learn the biology part. It’s to learn the machine learning part!

Finance and biology are what we call “domain knowledge”. That’s the part you learn by yourself during your finance degree or your biology degree. It is not part of a machine learning course.

The goal then, is to use simple examples that everyone can understand easily. Especially important are visualizable examples. I often use the “Gaussian clouds” in my courses, because it provides geometric intuition for what machine learning is actually doing.

When you realize that all you’re trying to do is separate the purple dots from the red dots, you realize that it’s not magic after all.

A beginner may say: “Yeah, but Gaussian clouds are not REAL DATA!”

This is not correct thinking.

The correct thinking is: it doesn’t matter what the data is. The code would be the same anyway.

The most important fact to realize is that the point of “learning” machine learning isn’t that 3 lines of Scikit-Learn code.

You should be able to do that all by yourself after spending a few minutes reading the documentation.

“Learning” machine learning means learning what goes on inside those 3 lines of Scikit-Learn code, and realizing that it encapsulates perhaps tens or hundreds of lines of code. True understanding and competence would be the ability to implement that code yourself, without needing Scikit-Learn.

Furthermore, that 3 lines of Scikit-Learn code is the same for any dataset.

You wouldn’t ask, “How can I adapt this algorithm to work on my finance dataset?”

The algorithm doesn’t change just because you are using your special finance dataset or your special biology dataset.

Linear regression is always linear regression, the same linear regression that has existed for hundreds of years. There’s no such thing as “linear regression for biology” or “linear regression for finance”.

Linear regression is: $$w = (X^TX)^{-1}X^Ty$$. This is the case for any dataset.

That’s why “all data is the same”.

Deep Learning and Artificial Intelligence Newsletter

Get discount coupons, free machine learning material, and new course announcements