Least square regression implementation based on https://www.mathsisfun.com/data/least-squares-regression.html. Supplemental sources:
- https://en.wikipedia.org/wiki/Least_squares
- https://www.youtube.com/watch?v=Q81RR3yKn30&list=PLblh5JKOoLUICTaGLRoHQDuF_7q2GfuJF&index=22&ab_channel=StatQuestwithJoshStarmer
Download processing here https://processing.org/.
The next step would be to turn this into Ridge regression! The goal of this strategy is to attempt to mitigate the effect of outliers by adjusting the way that the regression is calculated. See https://towardsdatascience.com/ridge-and-lasso-regression-a-complete-guide-with-python-scikit-learn-e20e34bcbf0b for more information.
- Download processing.
- Open and run the code in processing.
- Once the code is running click on the canvas to create a point.