Linear Regression and Java Dates

Posted by Smithers on Stack Overflow See other posts from Stack Overflow or by Smithers
Published on 2010-04-07T04:53:28Z Indexed on 2010/04/07 5:13 UTC
Read the original article Hit count: 568

I am trying to find the linear trend line for a set of data. The set contains pairs of dates (x values) and scores (y values). I am using a version of this code as the basis of my algorithm.

The results I am getting are off by a few orders of magnitude. I assume that there is some problem with round off error or overflow because I am using Date's getTime method which gives you a huge number of milliseconds. Does anyone have a suggestion on how to minimize the errors and compute the correct results?

© Stack Overflow or respective owner

Related posts about java

Related posts about math