Search code examples
javadeprecatedcurve-fittingapache-commons-math

Alternative for deprecated apache commons CurveFitter class?


The org.apache.commons.math3.optimization.fitting.CurveFitter is deprecated.

It was a useful class. Why was it deprecated?

The docs don't say what we should use instead. What is the alternative class?


Solution

  • This package-level javadoc explains:

    http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/optimization/package-summary.html

    Basically, the entire org.apache.commons.math3.optimization.* tree is being reworked.

    The direct replacement class for CurveFitter is org.apache.commons.math3.fitting.AbstractCurveFitter.

    Why? You would need to trawl through the issue tracker and developer mailing lists to find that out.