The regression of a set of points to the equation of a circle (circular regression) can be achieved by minimizing both an algebraic distance and a geometric distance.
To calculate the linear regression of a dataset towards the equation of a circle centered at with radius
, the function to minimize is
| (3.84) |
To solve the problem, it is advisable to perform a change of variables and minimize the algebraic form:
| (3.85) |
The problem reduces to solving a linear system of equations
| (3.86) |
Once the parameters ,
, and
are obtained, it is possible to derive the original parameters of the circle:
| (3.87) |
The same result can be achieved using the linear solvers discussed earlier. Consider, for example, an algebraic representation of a circle
Given a list of points that belong to a noisy circumference, the parameters that describe the circle are obtained by solving the homogeneous constraint system (3.88). As will be detailed in subsequent problems, for purely computational reasons, it is advantageous to normalize the input data, as the different unknowns are associated with data of significantly varying magnitudes.
The algebraic solution is often used as an initial solution for iterative techniques that minimize a different metric. To perform geometric regression, it is necessary to minimize the distances
. To minimize this quantity, a nonlinear least squares solver is required, such as Levenberg-Marquardt, along with the computation of the derivatives of the cost function.
An alternative is to parameterize the problem in a space different from the Cartesian one. By using the parametric form of the equation of the circle
| (3.89) |
| (3.90) |
Paolo medici