Introduction - If you have any usage issues, please Google them yourself
The least squares method is used to estimate W and B. The least squares method is trying to find a straight line, so that the sum of Euclidean distance of all the samples to the line is minimum