LineFit Ruby Gem does weighted or unweighted least-squares line fitting to two-dimensional data (y = a + b * x). (Linear Regression)