Machine Learning !!

Read time < 4 min

Have you ever thought how Facebook recommends you people to add as friends?, how self driving cars work?, how emails are classified as spam or not spam?, etc. How we made machines capable of doing those tasks which require planning, intelligence, coordination, etc? Basically, the question that comes to our mind is-

How can we make machines mimic human behavior & intelligence?



To keep this blog simple & considering a part of audience to be from non-computer background, I will try to answer those questions through non-technical terms, and I hope by the end of the blog you will be having clear understanding of such things.

Suppose you want to teach math. To do so, you must know what math is? Similarly, if you want to incorporate intelligence in something, you must know what intelligence is? RIGHT?


Intelligence, in simple terms may be defined as the ability to acquire & apply knowledge & skills. Now knowledge & skills are the things that we learn through environment, facts, etc. by using our sense organs. Our brain processes it knowingly or unknowingly, through which we develop likes and dislikes, good things & bad things, etc. Now imagine, if you were never given any input through your senses, what can you do now? Probably only those tasks, which your brain is already programmed to do by genes, like breathing, maintaining body temperature, etc. Without external information, you won't be intelligent, you will be a mere machine.

So, now since you became machine in the last para, let's make you intelligent.
Machine learning allows machines to learn through data & environment after which they become intelligent, they can plan, coordinate, understand & respond.

Now the question is how it actually happens? 





Above image shows similarity between the way machine can learn and the way 
humans learn. The basic idea is, you give data as input to an algorithm, that algorithm analyses the given data, finds patterns or some kind of mathematical function and uses those findings for future predictions.
We refer to this coded setup as our machine learning model. Let me take a very simple example to show how things actually work in a very simple machine learning model. Suppose I want to design a model to learn from following data-

TRAINING DATA ( Data that will be used for training )

X    Y
1    3
2    6
3    9
5    15

and predict on,

TESTING DATA ( Data that will be used for testing )

X    Y
10  ?
11  ?

you know the answer right :)

Many algorithms can be used to build this model, suppose I use one of them, let's say, Linear Regression. Algorithm will take input, it will try to build a relation between X & Y, you know that it is Y = 3*X, but our algorithm will analyse the data first, it will process it and finally it will come on with the same relation. So, prediction will be basically done with the same function that you use, there is no magic, only mathematics is there. Now, how it gets to that relation is a different thing, different algorithms will do it differently & I can't discuss that here. But I hope you got to know that, only math is being used there, nothing special and let me tell you one thing, you yourself are using math to live your life knowingly or unknowingly. After getting that relation model will predict -

X    Y
10  30
11  33

So, when you start studying machine learning, you will learn about different stuffs, linear regression, logistic regression, SVM, neural networks etc. These are basically different algorithms, some work better in some cases, while some other work better in some other cases. But the important point here is, machine learning is based on mathematics, if I show you a picture & ask you to classify it as a dog or horse, you will instantly give me an answer. If I ask math behind it, you won't be able to explain it. But let me tell you, math is even there.

Intuition Behind Image Classification
When we train ML models to classify an image, it uses mathematics as its core to function, it analyses the size, shape, curves, relative position of body parts, even color, a lot of other features and then predicts. Think about yourself, you will also classify using those things unconsciously. If a picture has 6 legs, it can't be dog right? If position of its nose is on forehead, it can't be a horse right? So, all this mathematics makes sense for machine learning models, I hope I was able to provide the intuition to you.

Intuition Behind Text Classification
When we train ML models to classify a text, it does probabilistic & statistical analysis for words which can make the text as spam. Such words can be discount, free free free, WIN Rs. 1,00,00,000, etc. 

So,  I hope with these very basic examples & intuitions, you might be convinced by now that machine learning is no magic, those highly advance AI stuffs are not magic, the only point is, right now you don't know how mathematics can be used to do those tasks. Once you start learning ML, you will learn about such algorithms, their mathematics & how to code them. I hope this blog will be useful for your learning, upcoming blogs will be aimed at programming & how to learn machine learning, subscribe for more interesting blogs.


HAPPY LEARNING !

Post a Comment

0 Comments