Class PolynomialCurveFitter
- java.lang.Object
-
- org.apache.commons.math4.legacy.fitting.AbstractCurveFitter
-
- org.apache.commons.math4.legacy.fitting.SimpleCurveFitter
-
- org.apache.commons.math4.legacy.fitting.PolynomialCurveFitter
-
public final class PolynomialCurveFitter extends SimpleCurveFitter
Fits points to apolynomial
function.
The size of theinitial guess
array defines the degree of the polynomial to be fitted. They must be sorted in increasing order of the polynomial's degree. The optimal values of the coefficients will be returned in the same order.- Since:
- 3.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.math4.legacy.fitting.SimpleCurveFitter
SimpleCurveFitter.ParameterGuesser
-
Nested classes/interfaces inherited from class org.apache.commons.math4.legacy.fitting.AbstractCurveFitter
AbstractCurveFitter.TheoreticalValuesFunction
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PolynomialCurveFitter
create(int degree)
Creates a default curve fitter.-
Methods inherited from class org.apache.commons.math4.legacy.fitting.SimpleCurveFitter
create, create, getProblem, withMaxIterations, withStartPoint
-
Methods inherited from class org.apache.commons.math4.legacy.fitting.AbstractCurveFitter
fit, getOptimizer
-
-
-
-
Method Detail
-
create
public static PolynomialCurveFitter create(int degree)
Creates a default curve fitter. Zero will be used as initial guess for the coefficients, and the maximum number of iterations of the optimization algorithm is set toInteger.MAX_VALUE
.- Parameters:
degree
- Degree of the polynomial to be fitted.- Returns:
- a curve fitter.
- See Also:
SimpleCurveFitter.withStartPoint(double[])
,SimpleCurveFitter.withMaxIterations(int)
-
-