# Package org.apache.commons.math3.fitting

package org.apache.commons.math3.fitting
Classes to perform curve fitting. Curve fitting is a special case of a least-squares problem where the parameters are the coefficients of a function \( f \) whose graph \( y = f(x) \) should pass through sample points, and were the objective function is the squared sum of the residuals \( f(x_i) - y_i \) for observed points \( (x_i, y_i) \).

Related Packages
Package
Description
org.apache.commons.math3
Common classes used throughout the commons-math library.
org.apache.commons.math3.fitting.leastsquares
This package provides algorithms that minimize the residuals between observations and model values.
Classes
Class
Description
AbstractCurveFitter
Base class that contains common code for fitting parametric univariate real functions `y = f(pi;x)`, where `x` is the independent variable and the `pi` are the parameters.
AbstractCurveFitter.TheoreticalValuesFunction
Vector function for computing function theoretical values.
CurveFitter<T extends ParametricUnivariateFunction>
Deprecated.
As of 3.3.
GaussianCurveFitter
Fits points to a `Gaussian` function.
GaussianCurveFitter.ParameterGuesser
Guesses the parameters `norm`, `mean`, and `sigma` of a `Gaussian.Parametric` based on the specified observed points.
GaussianFitter
Deprecated.
As of 3.3.
GaussianFitter.ParameterGuesser
Guesses the parameters `norm`, `mean`, and `sigma` of a `Gaussian.Parametric` based on the specified observed points.
HarmonicCurveFitter
Fits points to a `harmonic oscillator` function.
HarmonicCurveFitter.ParameterGuesser
This class guesses harmonic coefficients from a sample.
HarmonicFitter
Deprecated.
As of 3.3.
HarmonicFitter.ParameterGuesser
This class guesses harmonic coefficients from a sample.
PolynomialCurveFitter
Fits points to a `polynomial` function.
PolynomialFitter
Deprecated.
As of 3.3.
SimpleCurveFitter
Fits points to a user-defined `function`.
WeightedObservedPoint
This class is a simple container for weighted observed point in `curve fitting`.
WeightedObservedPoints
Simple container for weighted observed points used in `curve fitting` algorithms.