III.1

The Best Least-Squares Line Fit

Alciatore David,     Mechanical Engineering Department Colorado State University Fort Collins, Colorado

Miranda Rick,     Mathematics Department Colorado State University Fort Collins, Colorado

Introduction

Traditional approaches for fitting least-squares lines to a set of two-dimensional data points involve minimizing the sum of the squares of the minimum vertical distances between the data points and the fitted line. That is, the fit is against a set of independent observations in the range 1 y. This gem presents a numerically stable algorithm that fits a line to a set of ordered pairs (x, y) by minimizing its least-squared distance to each point without regard to orientation. This is a true 2D point-fitting ...

Get Graphics Gems V (IBM Version) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.