Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 780 Bytes

File metadata and controls

12 lines (10 loc) · 780 Bytes

Linear regression tries to model the relationship between two variables by applying a linear equation to a series of data. Implement linear regression using closed form solution and the Gradient Descent algorithm. Report the learned parameters (θ0 , θ1 , ..., θn ), and also the value of MSE error on the train and test data.

Plot of the datasets and regression lines:

closed form

closedform2

Gradient Descent

gradient

Plot cost function in Gradient Descent

cost function