Ruby scripts to implement linear regression with the least squares method