Simple non-iterative linear procedures for finding the least squares line in three dimensions are presented. The more rigorous minimizes the sum of the squared perpendicular distances between the data points and the fitted line. It involves the solution to an eigensystem and is an example of the well known method from classical mechanics of finding the principal axes and moments of inertia of an anisotropic object. In addition to determining the best fitted line to the data according to the least squares criterion, the eigensystem solution produces the best fitted plane. This is useful in cases where the data display curvature, for the best fitted plane is the plane of curvature. The less rigorous solution is an approximation that minimizes the sum of squared lengths of the bases of isosceles triangles. The arms of the triangles are the lines from the origin, which is placed at the centroid of the data, to the data point and the line of the same length from the origin along the fitted line. The approximate procedure is three to four times faster than the rigorous one and gives virtually identical results as long as the data do not deviate extensively from linearity.
All Science Journal Classification (ASJC) codes
- Applied Microbiology and Biotechnology
- Chemical Engineering(all)