Skip to content

dipsuw/Polished_Code_Release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Elastic Net CV

The elastic net is a regularized regression method that linearly combines the L1 and L2 penalties of the lasso and ridge methods. The loss function is given as below. I used cyclic coordinate descent algorithm to implement this regression method. alt text

In this repo, I have added following files in 'src' directory:

Elastic_Net.py:

This is the source code file where I have implemented my own coordinate descent algorithm to solve least-squares regression with elastic net regularization.

demo_on_real_dataset.py:

This is the demo file that allows the user to launch ElasticNet method on a real world dataset(Hitters).

demo_on_simulated_dataset.py:

This is the demo file that allows the user to launch ElasticNet method on a real world dataset(Hitters).

compare_with_sklearn.py

This is the file that allows user to perform comparison between my implementation and scikit-learns ElasticNetCV on a real world dataset(Hitters)

To run the above files, clone this repo and make sure following packages are installed on the system.

  • pandas
  • numpy
  • sklearn
  • matplotlib.pyplot
  • sklearn.cross_validation
  • sklearn.linear_model.ElasticNet
  • sklearn.linear_model.ElasticNetCV

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages