lessthanoptimal / ddogleg

Java numerics library for optimization, polynomial root finding, sorting, robust model fitting, and more.
http://ddogleg.org
49 stars 18 forks source link

Simple linear regression? #24

Closed ennerf closed 1 year ago

ennerf commented 1 year ago

I need to do a simple linear regression on an array of x/y values, but the ExampleRobustModelFit example needs multiple custom classes.

Is that the way to go or is that anything simpler that works out of the box?

ennerf commented 1 year ago

Solved it with PolynomialFit from EJML

lessthanoptimal commented 1 year ago

Do you need to remove noise?

ennerf commented 1 year ago

I haven't tested noise removal yet, but the initial version already worked well enough for what I was looking at