Kurvv Blog

How can a Machine Learn? You already know.

Nov 1, 2019 7:50:19 AM / by Ryan Lee

You already know how machines learn.


Machine Learning. Machines that Learn.  Or more specifically, “the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead.” (Wikipedia). Huh?

How can a non-living organism “learn” anything? Seems like something out of a science fiction movie, or something that is used by wizards or witches which us ‘muggles’ can’t even begin to understand.

But if you took math in middle school, you already have the basic knowledge needed to understand how a “machine” can “learn” (or be trained).

Linear equations with two variables (Y = aX + b). Look familiar?

If you know that when X is zero  Y is also zero (0,0), and that when X is ten and Y is also ten (10,10), your linear equation will tell you that a is 1 and b is 0(a =1, b=0) which lands on the equation of Y = X.  This equation will be able to tell you the Y for any value of X.

In essence, your “Machine Learning algorithm” (linear equation) has been provided training data of (0,0) and (10,10), and it draws a straight line between the two data points. This resulted in a trained model of Y = X. This “machine” can now make “predictions” for whatever X value you provide.  0.1 –>  0.1, 1000–> 1000, 1,000000 –>  1,000,000 and so on.

Let’s use an over-simplified real life example to better illustration. Say you are taking part in a 5K race and want to predict how much distance you would have covered in 100 seconds. When you start you haven’t moved at all so at zero seconds you have covered zero meters.(0,0) 10 seconds later you find that you have covered 10 meters.(10,10) With these two data points you could build a (linear) model of  Distance (Meters)= Time (Seconds), where a is 1 and b is zero (Y = X) . Your “model” can now make a prediction of the distance you would have covered in point in time including 100 seconds. 100 Meters.

Above, you have trained a model that can predict the distance you would have traveled in any given second without explicitly instructing it use 1 as the value of ‘a ‘(a=1). It learned that a=1.  How useful is this model though? That question itself is a total different problem (and a future post).

Photo by JESHOOTS.COM on Unsplash

Tags: Blog

Ryan Lee

Written by Ryan Lee