https://github.com/msikorski93/Linear-Regression-From-Scratch
Different solutions of linear and polynomial regression made from scratch.
https://github.com/msikorski93/Linear-Regression-From-Scratch
from-scratch gradient-descent linear-regression numpy ordinary-least-squares polynomial-regression tensorflow
Last synced: 6 months ago
JSON representation
Different solutions of linear and polynomial regression made from scratch.
- Host: GitHub
- URL: https://github.com/msikorski93/Linear-Regression-From-Scratch
- Owner: msikorski93
- Created: 2023-04-27T21:58:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-05T13:19:06.000Z (9 months ago)
- Last Synced: 2025-02-19T20:12:42.068Z (8 months ago)
- Topics: from-scratch, gradient-descent, linear-regression, numpy, ordinary-least-squares, polynomial-regression, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 1.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linear-Regression-From-Scratch




Linear and polynomial regression solutions made from scratch using TensorFlow 1 framework.
### New notebook for January 2025
Linear regression solutions built from scratch, without using fancy frameworks (only NumPy was implemented). We evaluated the performances with basic regression metrics as below:
| Model | MSE | MAE | R² | RSS | Slope | Intercept |
|:-------------------------:|:--------:|:--------:|:--------:|:--------:|:--------:|:---------:|
| Gradient Descent | 0.056114 | 0.208579 | 0.863454 | 6.733636 | 2.046441 | 11.358466 |
| Ordinary Least Squares #1 | 0.056114 | 0.20858 | 0.863454 | 6.733636 | 2.046379 | 11.358499 |
| Ordinary Least Squares #2 | 0.056114 | 0.20858 | 0.863454 | 6.733636 | 2.046379 | 11.358499 |
| Scikit-Learn | 0.056114 | 0.20858 | 0.863454 | 6.733636 | 2.046379 | 11.358499 |We proved that our custom models are valid and accurate alternatives to the scikit-learn model, with virtually no noticeable difference in performance or output.