Much like in Excel where we can take a distribution and make a trendline for it (power law), how can I calculate that in Java for an array of numbers?
Asked
Active
Viewed 838 times
1 Answers
2
The package org.apache.commons.math.optimization.fitting
includes CurveFitter
and PolynomialFitter
that will cover many of the typical excel trend line options. JFreechart
includes some support for Regression
.

trashgod
- 203,806
- 29
- 246
- 1,045
-
I am getting values back, but they dont' seem to be at all inline with what i get in excel. I mean, i realize there is some imimentation variance, but orders of magnitude are different. – JMH Aug 08 '12 at 22:21
-
I've never compared the two directly. Can you edit your question to include an [sscce](http://sscce.org/) that focuses on the fit you're examining? – trashgod Aug 09 '12 at 00:08