Linear Regression at Work

  

Linear Regression is often the step one which any beginner takes to dive into the ocean of Machine Learning and Data Science. Though seemingly simple enough at the beginning, that fact should not undermine its potential power in prediction models. Linear Regression superficially does not really require intense mathematics to understand. It is quiet simplistic to understand provided an intuitive and a logical mind is at play. Let me just walk you through an intuitive way to understand Linear Regression.

..with a short story..



So the sky suddenly turned pitch black, the cold chilly winds stopped playing its havoc of bumping the tree branches on your glass window, the sun hid in some corner. Dressed up in your new suit as always, up for an important business meeting, you admired the new weather. ...Until it started raining.
Initially you began cursing the weather but the stream of thoughts went on for a while taking you to a realm of Data Science and hence the question... Can the amount of rainfall be predicted?
Sure you knew it can. Unless you don't live inside a rock or use your smartphone as a shield, you must know that. Nature has got its formula somewhere which it does not like to share with Humans( saying this because some animals have got a sense of predicting the weather), so we left with ourselves. Oh wait! No! Data Science.
Taking a chair nearby, you park your seat at door waiting for the rain to go away and staring at the collecting pool in the muddy soil whilst thinking....


Now let me answer that question for you..


Initially, let's take 3 factors into account : The Rainfall millimeters, the temperature and the wind speed. Note that the Rainfall millimeters is the variable to be predicted and the other two are the independent variables, ie, they are independent to vary individually ( which means they should be uncorrelated ). The temperature axis should have all the ranges of wind speed and vice-versa. 

The graph should look somewhat like this:

The above figure shows that the variables are independent of each other.

As we can see, the each point in the temperature axis has got all the wind speed parameters and vice-versa. That is, the values are not tied to each other like the following figure.

The graph is a hypothetical one showing the correlation exists between the parameters

A hypothetical situation in which the temperature exhibits a relation with wind speed due to an "unknown" nature force. Note, such situation does not mean that the temperature dictates the wind speed or vice-versa. It means that the both these factors are secretly governed by some hidden natural parameter.



If the second situation ever occurs it is wise to not consider only one parameter because both the variables can be dubbed as one dimension. Putting the 

















Comments

Popular posts from this blog