Package org.hipparchus.fitting.ransac
Class PolynomialModelFitter
java.lang.Object
org.hipparchus.fitting.ransac.PolynomialModelFitter
- All Implemented Interfaces:
IModelFitter<PolynomialModelFitter.Model>
public class PolynomialModelFitter
extends Object
implements IModelFitter<PolynomialModelFitter.Model>
Fitter for polynomial model.
- Since:
- 4.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classClass representing the polynomial model to fit. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecomputeModelError(PolynomialModelFitter.Model model, Fittable point) Computes the error between the model and an observed data.Fits the mathematical model parameters based on the set of observed data.
-
Constructor Details
-
PolynomialModelFitter
public PolynomialModelFitter(int degree) Constructor.- Parameters:
degree- degree of the polynomial to fit
-
-
Method Details
-
fitModel
Fits the mathematical model parameters based on the set of observed data.- Specified by:
fitModelin interfaceIModelFitter<PolynomialModelFitter.Model>- Parameters:
points- set of observed data- Returns:
- the fitted model parameters
-
computeModelError
Computes the error between the model and an observed data.This method is used to determine if the observed data is an inlier or an outlier.
.- Specified by:
computeModelErrorin interfaceIModelFitter<PolynomialModelFitter.Model>- Parameters:
model- fitted modelpoint- observed data- Returns:
- the error between the model and the observed data
-