Does anyone know a Java science / math library that has a straightforward implementation of weighted linear regression? Something along the lines of a function that takes 3 arguments and returns the corresponding coefficients:
linearRegression(x,y,weights)
It seems pretty simple, so I think it exists somewhere.
PS) I tried the Flannigan library: http://www.ee.ucl.ac.uk/~mflanaga/java/Regression.html , she has the right idea, but it seems to be sporadic and complains about my degrees of freedom?
java linear-regression
C. Reed
source share