“Every problem becomes childish when once it is explained to you”

Monday, August 21, 2017

Quickstart to Machine Learning with Simple Linear Regression

Machine learning is a process which learns from given data and produces a model from which some insights can be generated. This can be used for various types of data analytics like predictive analytics. 

There are many languages/tools available to do the statistics with Machine learning. Below are the list of such tools.
Languages
R,Python,Java,Scala etc..
Frameworks
Spark MLLib,Tensorflow,Theano,Caffe etc..

R is the easiest and simplest of them to start the learning. We can use http://www.r-fiddle.org/ an online R console.

If you are a beginner in Machine Learning, understanding the linear regression is the best way to start your journey in machine learning.

Predicting the future by analysing the historical data is the ultimate aim for predictive analytics. Linear regression is one of the statistical methods for achieving it. Even though the model is quite simple, this has been widely used in various industries for Sales/Market Model Prediction,Fitness analytics, Pricing prediction in real estate etc..

Linear regression can be seen as a relationship between 2 variables, Dependent and Independent. There can be either single(simple linear regression) or multiple independent variables can be present(multiple linear regression).

Here we can see how a simple linear regression works..
If the value of a variable changes linearly based on the value of another variable, the relationship between these 2 variables can be called linear relationship.
Let X(independent) & Y(dependent)  be the variables
If the relationship between these  2 variables can be identified, we can predict the value of Y by knowing X.

Equation of straight line helps in finding this linear relationship.

Equation: y= mx+b

m & b are the relationship variables. 

A simple function lm() in R helps to find the relationship ie the values of m & b.


Theory is enough.. Now we can move on to a practical usecase “StockMarket Model” with R

No comments:

Post a Comment