Supervised learning
Give the right answer for each example of data. The following approaches can be used in supervised learning.
- Regression: Predict real value output.
- Classification: Discrete value output.
Linear regression
Linear Regression is an approach to show the relationship between the independent variable x and dependent variable y.
Our goal is to find the fit of the line. The best fit means where the error is minimum. It can make our prediction more accurate.

Using this line we can predict a value that is not in the data set. The value will be predicted more accurately as we have achieved the best results after the data set.
If there is a graph between the house prices and size in feet two we can predict the price of the house at any value of the size of the house using the best-fit line.

I am using a house price example to explain this.
Terms used most frequently
m= no. of training example
x=input variable/feature
y=output variable/target
(x,y)= single training example, one row
(x(i),y(i))= ith training example i is not power but row number
(x(2),y(2))= (1406, 232)
Our learning machine should look like the following
Input

Estimated output
What is the hypothesis?
hθ(x) = θ0+ θ1 x the equation of the lineθ0,θ1 are parameter and how the effect.

So we have to find theta 0, and theta 1 to get the best line for our training set. hθ(x) is close to y.
This means we have to get an error between input and output.
Mean hθ(x)-y=small, minimum
hθ(x(i))-y(i)for 1 term.
All the values can be written as

We will be using the sq. error function for the regression problem to get the accurate difference.

J (θ) is called the cost function.
Let’s understand the cost function










Prasanna MuraliPosted Jul 29, 2016, 11:46 AM
Nice one..
Bhuvanesh MohankumarPosted May 3, 2016, 12:47 PM
Good one..
Kuppurasu NagarajPosted Apr 11, 2016, 1:44 PM
Nice Sharing
Ankit BansalPosted Jan 18, 2016, 12:34 AM
Really helpful..
Santhakumar MunuswamyPosted Jan 17, 2016, 2:01 PM
Thanks for nice share
Nanddeep NachanPosted Jan 17, 2016, 9:38 AM
Nice share