Class PolynomialModelFitter.Model

java.lang.Object
org.hipparchus.fitting.ransac.PolynomialModelFitter.Model
Enclosing class:
PolynomialModelFitter

public static final class PolynomialModelFitter.Model extends Object
Class representing the polynomial model to fit.
  • Constructor Details

    • Model

      public Model(double[] coefficients)
      Constructor.
      Parameters:
      coefficients - coefficients of the polynomial model
  • Method Details

    • predict

      public double predict(double x)
      Predicts the model value for the input point.
      Parameters:
      x - point
      Returns:
      the model value for the given point
    • getCoefficients

      public double[] getCoefficients()
      Get the coefficients of the polynomial model.

      The coefficients are sort by degree. For instance, for a quadratic equation the coefficients are as followed: y = coefficients[2] * x * x + coefficients[1] * x + coefficients[0]

      Returns:
      the coefficients of the polynomial model