See also slides for curve fitting, regression, colab link
python: ols_and_kls.py
curve fitting.
how do we fit a distribution of data over a curve?
Given a set of data points
- (or )
ols.
Ordinary Least Squares (OLS)
Let be the prediction of a model , is the error, minimize
In the case of 1-D ordinary least square, the problems equates find to minimize
optimal solution
where , , ,
hyperplane
Hyperplane equation
Homogeneous hyperplane:
Matrix form OLS:
minimize
OLS solution
Example:
With
and
With
and
thus
See also Bias and intercept