GaussianCurveFitter, HarmonicCurveFitter, PolynomialCurveFitter, SimpleCurveFitterpublic abstract class AbstractCurveFitter extends Object
y = f(pi;x), where x is
the independent variable and the pi are the
parameters.
N observed points (xk, yk),
0 <= k < N.
∑yk - f(xk)2,
which is actually a least-squares problem.
This class contains boilerplate code for calling the
fit(Collection) method for obtaining the parameters.
The problem setup, such as the choice of optimization algorithm
for fitting a specific function is delegated to subclasses.| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
AbstractCurveFitter.TheoreticalValuesFunction |
Vector function for computing function theoretical values.
|
| Constructor | Description |
|---|---|
AbstractCurveFitter() |
| Modifier and Type | Method | Description |
|---|---|---|
double[] |
fit(Collection<WeightedObservedPoint> points) |
Fits a curve.
|
protected LeastSquaresOptimizer |
getOptimizer() |
Creates an optimizer set up to fit the appropriate curve.
|
protected abstract LeastSquaresProblem |
getProblem(Collection<WeightedObservedPoint> points) |
Creates a least squares problem corresponding to the appropriate curve.
|
public double[] fit(Collection<WeightedObservedPoint> points)
points - Observations.protected LeastSquaresOptimizer getOptimizer()
The default implementation uses a Levenberg-Marquardt optimizer.
points.protected abstract LeastSquaresProblem getProblem(Collection<WeightedObservedPoint> points)
points - Sample points.points.Copyright © 2016–2018 Hipparchus.org. All rights reserved.