To better understand the gradient descent algorithm, I've tried to implement it from scratch for a simple problem : linear regression.
I've implemented :
- Classic GD
- SGD
- Mini-batch SGD
- Python ⩾ 3.8
sudo apt install python3 python3-pip
- Clone the repo
git clone https://github.com/Clement-W/Linear-Regression-SGD.git cd Linear-Regression-SGD/ - Create and activate a virtual environment
pip3 install virtualenv --upgrade virtualenv venv source venv/bin/activate - Install the requirements
pip3 install -r requirements.txt
To see a demo, check the notebook file "LinearRegression_GD.ipynb". You'll find multiple examples of linear regression with classic gradient descent, stochastic gradient descent and mini batch stochastic gradient descent.
I'm still learning machine learning, so feel free to use Issues or PR to report errors and/or propose additions or corrections to my code.
