Image by Gerd Altmann from Pixabay

Machine Learning intuitions from everyday walks of life

Venkatesh Rengarajan Muthu
8 min readAug 13, 2020

--

The Internet is already enough flooded with articles on Machine learning, which has so far made me keep down my urge to write another article on ML & clutter the web pages. But mind comes up with new excuses/ideas & hence here I am with this article.

After brooding over the ML concepts for some time, I realized how excellently the word Machine Learning is coined. It’s how the machine is learning from how humans are learning & adapting from real-world scenarios. We can find the sources of ML intuitions in our real-world & our day to day decision making processes. The more I learn about machine learning, the more I am understanding the amazing decision-making process in our tiny brains. It’s true we carrying a supercomputer within ourselves!

Machine learning, just like any other field is not short of its own jargon. Let’s try to understand the meaning & intuitions it has from our very own common walks of life.

For the sake of simplicity, throughout this article, will quote fictional activities between a Grandpa & a Kid.

There are three broader types of ML, let’s try to understand the intuitions behind the same

  1. Supervised learning
  2. Unsupervised learning
  3. Reinforcement learning

1. Supervised Learning:

Supervised learning has various methods/algorithms. For example, its like Grandpa teaching different colors to the kid from early learners' books. The book has colors drawn in some shapes, say a triangle & it mentions the names of the colors. These specific color name mentions are ‘Labels’. (of course, the kid doesn’t read labels to learn the color, there is a great number of neural network activities going on in kid's brain to capture this color learning without knowing to read labels, hmm it’s getting complicated, let’s address neural networks later.)

Image by author

From the above picture, the kid can identify the last triangle as Green. Successfully grandpa taught the kid to identify the colors, in ML terms grandpa just taught classification type of learning to the kid. Yes, classification problems come under supervised learning. The same classification exercise if we teach a computer/machine, we go through a systematic approach called ‘algorithm’ & in this case its classification algorithm. Isn’t simple?

1.1 Simple Linear Regression

Grandpa was speaking to his friends on Go Green & talks diverted to their flat’s electricity bills. Grandpa said two months back his electricity bill was AED 600, last month it was AED 642 & he expects this month bill (considering summer is peaking) would be around AED 700 +/- 10%.

Excellent, grandpa just did linear regression in his mind without consciously knowing about the same. How? let’s analyze,

Grandpa analyzed the past two months & it has a rising trend. He analyzed and came up with a reason that there is increasing heat on account of peak summer, because of which ACs are running most of the time. From this analysis, he found a variable, temperature that causes the fluctuations in electricity bills. This is called Factor Analysis & the temperature is a factor to decide the electricity bill.

On the back of his wonderful brain, a sort of equation is being developed like this & the same is deduced to come up with an estimate of AED 700,

y (electricity units consumed) = b(some weights) * X(temperature) +/- 10% (e)

We can call this +/- 10% as an error term. What if Grandpa said the current month bill might be AED 675 +/- 50%, we say, common grandpa, say more precise number! Yes, that’s what we want, a lesser error term. Then Grandpa has to refine/re-do his calculations & has to come up with another estimate of AED 700 +/- 10%, if the error term is acceptable to us, we consider that estimate & move on! This activity of re-doing/re-iterating the process to come up with lessor error term is simply called iteration process & in Deep learning fancy is called epochs.

1.2 Logistic Regression

In a different scenario, Grandpa was getting ready his usual evening time chit chat session with his backbenchers in the usual hangout coffee shop. Grandma started saying, return home early & take this umbrella, as it looks going to be rainy. Grandpa said what? & said there won’t be any rain today & no need for an umbrella. Grandma asked what makes you think there won’t be any rain today?

Let’s analyze here, Grandpa is faced with a yes or no question & let’s see how his wonderful brain does analysis here.

Grandpa started saying, yesterday it was windy as well as cloudy, hence yesterday rain came, today there is not much wind & clouds are just darkening up, am 90% confident that there won’t be rain this evening.

Excellent, Grandpa just figured out a beautiful Logistic regression expression, again consciously not knowing about the same! That is based on the factors like wind & cloud, his mind came up with the maximum probability for no rain today scenario. In ML terms, Logistic regression in its basic form is used to predict binary events (like rain/no rain). And this 90% confidence is a beautiful expression, it shows his confidence in his findings. Roughly, we can call this a coefficient of determination (R squared). What if Grandpa said that there won’t be any rain today & he is 50% confident, Grandma might have said better don’t go for chit chat session today. Then, grandpa might have to re-do/iterate again his analysis & need to come up with a new solution which has higher confidence. Yes, we need to conclude our analysis with higher confidence or the otherwise higher coefficient of determination.

1.3 Decision Trees

Grandpa is engaged in a conversation with Grandma on the decision to buy a new house. They have got a few factors to be considered viz, near to the metro station, near to the school, or near to a beach. They have got to make decisions sequentially considering all the options better for the stakeholders. Their decision-making process is as under,

Image by author

The same thought process is carried in the Decision Tree algorithm, where each decision making point/node is being analyzed to come up with an optimal solution. Such decisions based on trees like above might fit our requirements for a particular period. This decision-making process tends to change over sometime & factors like near to school or near to beach might change their weights & in such cases, the earlier drawn decision making trees might not yield a good result. This phenomenon is called overfitting. i.e. we tend to make precise tree-based decisions on a particular time frame, which may not be best suited for decisions at later stages because of changes in factor weights.

1.4 Random Forest

In the above tree-based decision, Grandpa made the decision using the tree flow. But that might have a high risk of bias from Grandpa. Such a decision taken might not be an optimal decision. What would be a solution to this? Yes, collective decision! which is called ensemble or group decision-making process. Let’s call all the family members & ask them to walk through the decision tree process. Kids may prefer the beachfront, while parents may prefer either the house nearer to school or the metro station! A decision can be taken by way of voting of all the individual decision tree results to derive an ensemble/group decision. This process is called Random Forest, as the name forest itself derived as simple as a collection of trees.

picture by author

2. Unsupervised Learning

Grandpa loves to play along with the kids. He came up with a game that might of interest to the kids & he wanted the kids while playing to understand the concept of sorting/grouping/clustering! Yes, clustering is a type of unsupervised learning.

2.1 Clustering

Here in this game, Grandpa is going to give the kids a bunch of colorful M&M candies. Kids were given the task of grouping/clustering the m&m each color-wise. Grandpa felt that in this way kids can automatically learn the sorting/grouping/clustering activities. Kids were really efficient in clustering those m&m’s. If you notice, there were no labels/specific written description of the colors of each candy is involved in this exercise. Kids were happily able to divulge into this clustering activity & surprisingly came up with a bunch of yellow, blue, red & green candies, which in other words kids labeled the mix of m&m into color-wise m&m candies!

Photo by Sophie Elvis on Unsplash

3. Reinforcement Learning

Grandpa used to observe the kid playing around & used to amaze at how the kid can adapt automatically to the environments & simultaneously learn from the environments just by observing & not explicitly teaching!

For example, usually around 6:30 pm, the father used to return from the office. The kid was observing this for a while & one day, when the calling bell rings at around 6:30 pm, the kid started rushing towards the door shouting papa! The kid out of his own learning figured out by the usual evening timing, father must have reached home, nobody taught the kid.

Image by Julien Tromeur from Pixabay

The agent constantly learns on the go & constantly adapts to the situations around, this is another subtle way of expressing our own driving in reinforcement learning. The driver, as called as an agent in this context, constantly learns the road conditions & fellow cars/pedestrians around and adapts and navigate through the environment. Of course, self-driving cars take intuitions from human driving skills!

This is the goal of reinforcement learning. Making the machine to understand the surrounding environments & make them explore & exploit the environment for learning & interacting with the environment.

Opinion

As we just saw, its amazing to see machine learning algorithms take intuitions from our common everyday walks of life. We should always remember that machine learning is a baby step towards artificial intelligence. We are teaching machines various algorithms in the path towards AI to make human life good. ML, through its supervised, unsupervised & reinforcement learning algorithms tries to help us, the humans, in critical decision-making processes.

With the curiosity & excitement on the ML potentials, am greatly looking forward to continuing to explore this rapidly growing stream, while sharing the knowledge with beloved learners!

Feedbacks are most welcome. You can find me in LinkedIn at https://www.linkedin.com/in/venkateshdxb/

image by author

--

--

Venkatesh Rengarajan Muthu

Financial Professional | Consensys certified Ethereum Developer | Founder BlockPeer & PDC Finance