The Math Behind Machine Learning

Discover the math behind machine learning to increase our understanding of ML hierarchy.

A supervised learning system exploits a mathematical concept to understand the relationship between a piece of data and its label. It is the idea of approximating a function. Let’s see how that idea works, with a concrete example.

Example of solar power prediction

Let’s imagine that we have a solar panel on our roof. We want a supervised learning system that learns how the solar panel generates energy and predicts the amount of energy generated at some time in the future.

There are a few variables that impact the solar panel’s output: the time of day, the weather, and so on. The time of day looks like an important variable, so we decide to focus on that one. In true supervised learning fashion, we start by collecting examples of power generated at different times of the day. After a few weeks of random sampling, we get a spreadsheet table that looks like this:

Time of the Day Power (in Watts/hour)
09:01 153
11:48 280
05:20 0

And so on!

Each line in the table is an example. It includes an input variable (the time of day) and a label (the generated power), just like in the system that recognizes animals, the picture is the input, and the name of the animal is the label.

If we plot the examples on a chart, such as the one shown here, we can visualize how the time of day relates to the energy produced:

Get hands-on with 1200+ tech skills courses.