Test for R2
[This is a work in progress] R squared is one of many ways to calculate how good a line fits some points. It is widely used in mathematics, statics, machine learning, etc fields. In fact it is not only for points (and one line) in a $\mathbb{R}^2$ (2D planes). The concept works for $n$ dimentions: $\mathbb{R}^n$, it is just that for humans it is easier to understand it in 2D planes. Finding a line from some points (WIP) Finding a line that best fits some points is called linear regression. It can be done using severl techniques but the simplest one is by "Linear Regression": So lets assume we have some random points: pointsX = [(0.5, 0.5)] Calculating R squared Toy implementation in Javascript Python implementation: https://www.geeksforgeeks.org/linear-regression-python-implementation/ What does really mean R squared? WIP https://www.khanacademy.org/math/statistics-probability/describing-relationships-quantitative-data/more-on-regression/v/calculating...