Skip to content

Implementing linear regression on a dataset using multiple techniques, such as normal equations, gradient descent, L1 regularization and L2 regularization

Notifications You must be signed in to change notification settings

AditiSharma97/Linear-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The program a3.py implements linear regression on a dataset with multiple techniques. Information about the dataset is available in the readme.txt file.

Normal equations method - Penrose pseudoinverse matrix is computed using python libraries

Gradient descent method - Loss function is defined as half the sum of squared errors over the training set. Testing set contains 2000 input points and normalisation is used.

Regularization - L1 and L2 regularization techniques are used. 1500 data points are set aside for cross validation, in order to compute the best value for the regularization coefficient.

Libraries used: numpy, pandas, matplotlib

Image files contain the plots generated for L1 and L2 regularization.

About

Implementing linear regression on a dataset using multiple techniques, such as normal equations, gradient descent, L1 regularization and L2 regularization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages