Class PolynomialCurveFitter


  • public class PolynomialCurveFitter
    extends AbstractCurveFitter
    Fits points to a polynomial function.
    The size of the 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.
    • Method Detail

      • withStartPoint

        public PolynomialCurveFitter withStartPoint​(double[] newStart)
        Configure the start point (initial guess).
        Parameters:
        newStart - new start point (initial guess)
        Returns:
        a new instance.
      • withMaxIterations

        public PolynomialCurveFitter withMaxIterations​(int newMaxIter)
        Configure the maximum number of iterations.
        Parameters:
        newMaxIter - maximum number of iterations
        Returns:
        a new instance.