Getting down to the fundamentals of Learning….

Photo by Andy Kelly on Unsplash

Change is the result of all true learning ~ Leo Buscaglia

What is learning? What does it mean when we say that we have learned something? What is information or knowledge or wisdom?

Learning happens when you observe a phenomena and recognize a pattern. You try to understand this pattern by finding out if there is any relationship between the entities involved in that phenomena.

Let’s try to break it down. Take the example of a simple phenomenon that we observe daily — the occurrence of day and night.

Photos by Nathan Anderson and Emma Van Sant on Unsplash

Is there a pattern? Yes, there is a pattern. For a fixed time period, we are exposed to light and heat of the sun, which we call day-time. And then for another fixed period, we are deprived of light and heat from the sun. We call it as night-time. This pattern repeats over and over and over…….We have an observation about a phenomenon and we have a pattern. Can we explain how this pattern occurs? There are 2 entities involved in this observation — Sun and Earth. Is there a relationship between the amount of light(and heat) originating from the sun and the surface of earth receiving it. The pattern suggests that the surface of the earth receives the light alternatively — gets it during the daytime, does not get it during night-time. How is this possible? There are many possibilities like:

  1. The sun is, somehow, switching ON and switching OFF at alternate periods of time.
  2. The sun keeps changing its position, revolving around the earth and illuminating different surfaces of the earth at different time periods
  3. The earth is rotating on its axis continuously, so that at a given time, people living on the surface which faces the sun, experience day while people living on the surface not facing sun, experience night.

The above 3 conclusions are called “models” that explain the observed phenomena. We can state or express these models as follows:

Model 1: Day/Night is a function of Magical ON/OFF switch of sun

Model 2: Day/Night is a function of the Revolution of Sun around the earth

Model 2: Day/Night is a function of Rotation of Earth on its axis

The question now arises — Which model(or function) is more accurate? As per the observations/findings of different philosophers/scientists across the ages, Model 3 is the most accurate model which explains the phenomena of Day and Night. We can say, that this model “fits” best for the observations around this phenomena. The other 2 models can be safely refuted based on many other observations which can not be explained by them.

Once a model has been built, it can be used to predict future outcomes for that phenomena. e.g in our example, our model can safely predict that occurrence of day/night will continue to happen until, for some reason, the earth stops rotating or sun runs out of its energy (Will the earth stop rotating? When will the sun spent all of its energy ?— these questions can be answered by using another model)

This is how humans learn.

All human learning is — observing something, identifying a pattern, building a theory (model) to explain this pattern and testing this theory to check if its fits in most or all observations.

Every learning, fundamentally, is a model expressing a pattern in a set of observations. If there is no conceivable pattern, there will be no learning.

Think of any mathematical formula or a physics equation or a theory in biology or any economics theorem or a chemical equation. All of these explain a pattern of the physical or natural world. Take the example of Newton’s laws of motion.

Newton studied the motion of physical bodies and explained this motion in terms of forces acted upon them. He discovered the “pattern” or “relationship” between the forces acting upon a body and the motion as a response to these forces and expressed it in form of his laws (“model”). Newton’s second law of motion is expressed mathematically as follows:

Force = Mass * Acceleration

Is this model accurate? Does it fit all observations? This model works in almost all cases but there are some exceptions. It starts predicting inaccurate results for bodies which are moving at very very high speeds. Einstein proposed another model to explain the motion of such bodies.

The central idea of this discussion is —

No model or learning reflects “true” or “absolute” reality. Every model or learning is an approximation of observed reality.

We have to update our model or learning in case we encounter new observations about the phenomena we are studying.

How do machines Learn?

Photo by Arseny Togulev on Unsplash

Is it possible for a machine to mimic the process of human learning? This is what the fields of Machine Learning and Artificial Intelligence are attempting to do. The basic idea remains the same. As with humans, machines are fed with observations (data). The learning algorithm, behind the scenes, try to find out a pattern among the data which best fits the observations. Let’s take a very simple example.

Below is a fake House Prices Data set consisting of 2 attributes: Area of House and its price.

Is there a pattern or a relationship between Price and Area. Just eyeballing this data and doing simple calculations in head, a human can deduce that :

Price = 20 times the Area

It is not 10 times or 12 times or 15 times….its precisely 20 times and all house prices in the dataset fit this model.

Can a computer algorithm find out this relationship( Price is 20 times Area)?. It can be done. An algorithm can achieve it in a crude way as follows:

  1. Assume that Price is w times Area. Start by randomly taking any value of w
  2. For each value of Area and w, calculate Price. Compare it with original price given in data. Original Price — Calculated Price is the error. Take a mean of the error for all Calculated and Original Prices. This is the average error caused by the model
  3. Change the value of w and keep repeating step 2 until the average error is 0 or approaches very close to 0 and no improvement is made

This is how a machine can learn the patterns in data. Now, the approach presented here is oversimplified. There is a whole lot of complexity behind the scenes (Refer to Linear Regression algorithm and Gradient Descent approach)

But the fundamental idea that I am trying to convey is: Whether its Human Learning or Machine Learning — both involve “observations” about a thing or a process or phenomenon. And then, identifying patterns about these observations. The expression of this pattern is the model which has been learned. Most often, this expression is a mathematical formula (function) defining the relationship between variables involved.

Photo by George Pagan III on Unsplash

Humans are instinctive pattern-finders. The fundamental need to find patterns is the basic survival strategy of our species. We are always fearful of the unknown. Uncertainty is troublesome. Pattern recognition helps us to alleviate this fear and gives comfort. When we know how an event has happened and what are the chances of it to happen again, we can prepare ourselves. If we recognize that Event 1 is “caused” by “Event 2”, we can utilize this knowledge to our benefit. This is the reason we are always looking for patterns and causal relationships between things, events and situations.

Without patterns, there can be no learning — neither human nor machine! It’s just CHAOS.

Human Learning vs Machine Learning was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.