Link: Least squares
Weighted least squares is a method for Fitting a curve to data. It’s similar to least squares method, but also take weighting into consideration.
The idea is:
- Divide the data points in different chunks
- In each chunk, use the weighted least squares: the closer the data point is to the focal point (in x axis), the more weighting it has; the last point has less influence on the fitting line.