https://github.com/aosingh/regularization
In this project we learn various regularizers with using Linear regression as a tool
https://github.com/aosingh/regularization
Last synced: 8 months ago
JSON representation
In this project we learn various regularizers with using Linear regression as a tool
- Host: GitHub
- URL: https://github.com/aosingh/regularization
- Owner: aosingh
- License: mit
- Created: 2016-11-22T16:56:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-06T02:47:38.000Z (over 9 years ago)
- Last Synced: 2025-05-15T14:11:31.389Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Regularization
In this project we learn various regularizers with using Linear regression as a tool.
### Clone this Repo
Clone this repository into whatever directory you'd like to work on it from:
```bash
git clone https://github.com/aosingh/Regularization.git
```
### Install the following on your local system
* [Python 2.7](https://www.python.org/download/releases/2.7/)
* [pandas](http://pandas.pydata.org/)
* `pip install pandas`
* [scikit-learn](http://scikit-learn.org/stable/)
* `pip install -U scikit-learn`
### Files
* `LinearRegression.py`
This class is responsible for performing [Linear Regression](https://en.wikipedia.org/wiki/Linear_regression) using the [gradient descent approach](https://en.wikipedia.org/wiki/Gradient_descent).
* The basic idea is calculate a cost function and then move in the direction of negative gradient at each step.
Finally, after certain number of iterations we converge and achieve the minimum value of the cost function.
In our case the cost function that we are trying to minimize is the MEAN SQUARE ERROR.
* `LinearRegressionTester.py`
In this file we invoke our Linear Regression method defined in the above class and compare the output with sklearn's version.