Least-Squares (Model Fitting) AlgorithmsLeast Squares DefinitionLeast squares, in general, is the problem of finding a vector x that is a local minimizer to a function that is a sum of squares, possibly subject to some constraints: such that A·x ≤ b, Aeq·x = beq, lb ≤ x ≤ ub, c(x) ≤ 0, ceq(x) = 0. The linear least squares problem is: given a matrix C and vector d, find x that minimizes ‖Cx – d‖2 s