Skip to main content

How Machine Learning Works ?

Welcome back readers !, Here with this post you will be taken into the journey of Machine learning and its working. Get ready for the wonderful journey, get set, seat belts on and lets get started.

Machine learning, the boom word of today's market. The force of people towards this, Companies march towards this, Countries research on these but why all these happens, Is it a new technology ? What does it do for us ?

Many people who are here reading this blog might have come across many blogs which explains this in very high technical jargon like Predictive analysis, Statistics, Mathematical Optimization, Supervised, Unsupervised, exploratory data analysis .. blah blah ...etc., Even I am a victim for this. This is very good for the person who already struggled to understand the basic of what is what, but for the beginners its again a language that is out of the earth.

This blog intends to make all the people beginner or expert to understand the basic in simple terms ans examples and contextually relating to the technical jargon.



Machine Learning the word is coined by Arthur Samuel in 1959 while working at IBM. The Machine learning can be said as a field that comprises of various algorithms (Step by step procedure to do a task) that learn the data that has been provided to it slowly over the iterations and reach the maximum accuracy levels. Here now comes the question like "Are we god ! we made a machine to think like human ?, How it can learn ? Does it have a brain ? " We are going to find the answers for these questions in this content here.

Before we find the answer, KEEP IN MIND that in machine learning the basic thumb rule is maximum accuracy and not accurate. We rely on the rule as "It helps in getting something in place of nothing".

Human way of learning / Thinking:

On the pathway to understand the how the machine will learn the given data, we first need to understand how human understand or learn something. Don't worry I am not going to take you all through the biological terms like IQ, Neurons etc etc. but on the high level in the theoretical basis. 

We humans gather all the data from our receptors (Sensors or the unit that receives the data from the environment we are in). These data are sent to the brain and the neurons calculate the various possibilities of values for the given data and try to learn the pattern that exist in the data. After learning that pattern we always try to relate the new data to the pattern and try to understand whether the new data fits the pattern properly. Here fitting we don't say accurate again but maximum accuracy.



This concept of identifying the pattern or the trend in the data that we have and trying to match the data to the patterns / trends is the basis for the field of Machine Learning.

Trends in the data 

Nature always follows a strict rule of following a mathematical way of doing the things like the waves in the ocean follows a sin equation (The human naming of the path that is followed by the wave). In the same way the data that has been recorded from the environment have the data following a particular trend or many kind of trends in the same data. For example. If you take a shopping site or a shop the trend here is "On the days of festivals the no.of people who make the shopping is more than the other days" Okay if there is a raise in the no.of shopping its obvious that the day is a special day, it can be a festival or any offer day etc." On taking the shop as a target of interest we can see each and every day the incoming people vary and this varying plot gives the trend and the distribution of people to that shop.

Finding Trends in the data:

We get the data from environment and we plot the same on the graph, we can find trends on the graph in any form as below,

Exponential Trend (Mathematically we call as function)

Linear function

Logarithmic function

Polynomial function

Power function with power as fraction

Power function with power as negative

Power function


Quadratic functions

Rational functions

Sinusoidal function (Sin wave function)



Great ! Only these much of trends only exist in nature ? No there are still lot more than these ones like cosine, parabolic etc. Here how does this helps in understanding what will occur in future given the data by the machine. We have some data that have the x and y, we train means we plot the graph and try to find the trend. If you have noticed above each and every trend above will have the equation guiding them. This equation is the one we are finding from the given data. After finding this equation, Imagine the scenario, you have trained with the data of experience and salary, You might have got a linear trend lets say, now you learnt that for a given x (experience) y (salary) is the output of the equation that you have found. Yola !! We predicted the salary for the experience of 3.125 yrs too.

This process of finding the equation that guides that trend is call the learning. The equation that we found is called the Model that we follow to predict the output given the new data that we have never seen in life.



With this did we complete the answer to the question How Machine learning works ? no not yet.. there are few more topics to be discussed to understand this. Its a usual trend that the human mind gets bored :-P on seeing a huge big content and reluctant, so I am splitting this into various posts... !! 

Read the following topics that address the topic question !


Comments

Post a Comment

Popular posts from this blog

How to access the each view of item by position in Recycler View in android ?

How to access the each view of item by position in Recycler View in android ? There are some methods to access the view of each item view to change or update the view during the run time. To access the view of the item view , consider the Recycler view as below, RecyclerView mainRecyclerView = (RecyclerView)view.findViewById(R.id.main_recycler_view); RecyclerAdapter adapter = new RecyclerAdapter(mContext); mainRecyclerView.setAdapter(adapter); main.setLayoutManager(new LinearLayoutManager(mContext));  To access the itemView of each position the following functions can be used,  1. View itemView = mainRecyclerView.getChildAt(positionOfItem);  2. View itemView = mainRecyclerView.findViewHolderForAdapterPosition(Position).itemView;  3. View itemView = mainRecyclerView.findViewHolderForPosition(Position).itemView;  4. Long itemId = mainRecyclerView.getAdapter().getItemId(position);       View itemView = mainRecyclerView.findViewHolderForItemId(itemId);  5. View

A.P.I call or async await not working in Array forEach ?

H ello Readers, Welcome back. You would have wondered why does forEach function on the array does not wait for any asynchronous function even if we provide the async await in the node js. If you are the person, wondered about this ever, this post is right for you. Non working example : Lets consider the below snippet, this will not wait for the asynchronous process to wait. I am making a setTimeout to mock the API call async process. This will result the count as, Output : count = 0 OMG !! Why it doesn't work ? Answer probably might be lying inside the Array prototype from JavaScript. Lets take a look inside the "Array.prototype.forEach" function. From the snippet its clear that, the for loop in which they call the callback function does not wait for the asynchronous process to run in the callback. So this forEach is not build for asynchronous process itself. So can't I use forEach any more for running a asynchronous function ? Answer g