Machine Learning

Another no-code, no-maths guide to machine learning

satyabrata pal
ML and Automation
4 min readOct 1, 2019

--

Machine Learning is the hottest buzz word today. These days you cannot go around anywhere without hearing this word or without coming across a device or service where you won’t find machine learning being used. It’s in your phone, it’s in your television, it’s in your speakers , in your cars and literally everywhere. But, how does this technology works, how does a machine “learns” something? This is what we shall explore in this post.

The Machine That Learns

At it’s core Machine Learning Algorithms are “codified” mathematical equations. These codified mathematical computations are known as algorithms and this is what helps the machine to learn.

Hey! You said it’s a no-code, no-maths guide

Well this is indeed a no-code, no-maths guide and I am not going to put any code or even a single equation here, but it helps to know what drives a machine learning algorithm and what it’s actually made up of. So don’t worry you are not going to look like this after reading this post.

How Machines See

Vision for a machine is not similar to the type of vision that you or I are accustomed to. A Machine’s point of view of the world exists at different dimension and reality than ours. Let's take an example of how a special class of algorithms known as "neural networks" recognizes different images and tries to differentiate between different objects.

Let's suppose a neural network is being taught to recognize a cat in an image. The picture in this case is of our friendly neighborhood cat named "Grumpy".

Grumpy Cat

Now if a neural network is being taught to recognize that the thing in this picture is a cat then the neural network needs to be given a large number of different cat images.

Something similar to these.

Well! not like this actually, but the point is that the neural network needs a large number of cat images to understand the different features of a cat and then uses this knowledge to identify a new image as a cat or not. Technically speaking a neural network goes through the millions of pixels in each of the images given to it and then tries to extract different features from these pixels e.g. if we provide cat images to a neural network then it might deduce the following →

  1. It's furry
  2. It's eyes have specific color or shape
  3. Has whiskers

The next time we show a different cat image to a neural network then it would use the features of a cat that it had learned earlier and then look for those features in the new cat image and if it finds that those features are also available in this new image, then it recognizes the thing in the new picture as a cat.

There is one catch though. If we try to provide images of only the grumpy cat to the neural network then it may not be able to successfully identify a new cat image as a cat. Why? because the algorithm has only seen and learned what a grumpy cat looks like and thus will fail to understand the subtle difference between different types of cats and the similarity between cats. So, it’s always important to feed a neural network a wide variety of examples of the thing that we want to train the neural network on.

What’s Next?

Now that we have trained our neural network to identify what a cat looks like, what happens when we show it another image which is not a cat? Let’s say we show it an image of a floor rug?

If the above image is shown to our neural network then it would not recognize the object in the image as a cat but it also would fail to recognize the image as that of a rug because we never trained our neural network to identify a rug. If we want that our neural network should be able to tell the difference between a cat and a rug in an image then we need to train our neural network on a set of different cat images and a separate set of different floor rug images and label each of the set as cat and floor rug respectively so that the neural networks knows which image set is that of cats and which image set is that of rugs.

Conclusion

This is a very basic example of how a machine learning algorithm really looks at the world around it and how it learns. If I had tried to dig any further then this article would had become very technical which is not the intended purpose of this post. However if you want to understand how computer vision works then this article from google can be help you out.

--

--

satyabrata pal
ML and Automation

A QA engineer by profession, ML enthusiast by interest, Photography enthusiast by passion and Fitness freak by nature