polynomial
function.
initial 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.
| Modifier and Type | Field and Description |
|---|---|
| private static final PolynomialFunction. | FUNCTION
Parametric function to be fitted. |
| private final double[] | initialGuess
Initial guess. |
| private final int | maxIter
Maximum number of iterations of the optimization algorithm. |
| Access | Constructor and Description |
|---|---|
| private | PolynomialCurveFitter(double[]
Initial guess. initialGuess, int Maximum number of iterations of the optimization algorithm. maxIter)Contructor used by the factory methods. |
| Modifier and Type | Method and Description |
|---|---|
| public static PolynomialCurveFitter | Returns: a curve fitter.Degree of the polynomial to be fitted. degree)Creates a default curve fitter. |
| protected LeastSquaresProblem | getProblem(Collection<WeightedObservedPoint>
Sample points. observations)Implements abstract org. Creates a least squares problem corresponding to the appropriate curve. |
| public PolynomialCurveFitter | Returns: a new instance.maximum number of iterations newMaxIter)Configure the maximum number of iterations. |
| public PolynomialCurveFitter | Returns: a new instance.new start point (initial guess) newStart)Configure the start point (initial guess). |
| FUNCTION | back to summary |
|---|---|
| private static final PolynomialFunction. Parametric function to be fitted. | |
| initialGuess | back to summary |
|---|---|
| private final double[] initialGuess Initial guess. | |
| maxIter | back to summary |
|---|---|
| private final int maxIter Maximum number of iterations of the optimization algorithm. | |
| PolynomialCurveFitter | back to summary |
|---|---|
| private PolynomialCurveFitter(double[] initialGuess, int maxIter) Contructor used by the factory methods.
| |
| create | back to summary |
|---|---|
| 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 to
| |
| getProblem | back to summary |
|---|---|
| protected LeastSquaresProblem getProblem(Collection<WeightedObservedPoint> observations) Implements abstract org. Doc from org. Creates a least squares problem corresponding to the appropriate curve.
| |
| withMaxIterations | back to summary |
|---|---|
| public PolynomialCurveFitter withMaxIterations(int newMaxIter) Configure the maximum number of iterations.
| |
| withStartPoint | back to summary |
|---|---|
| public PolynomialCurveFitter withStartPoint(double[] newStart) Configure the start point (initial guess).
| |