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 and Description |
|---|---|
| protected static class | AbstractCurveFitter.
Vector function for computing function theoretical values. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public double[] | Returns: the fitted parameters.Observations. points)Fits a curve. |
| protected LeastSquaresOptimizer | Returns: the optimizer to use for fitting the curve to the givenpoints.Creates an optimizer set up to fit the appropriate curve. |
| protected abstract LeastSquaresProblem | Returns: the least squares problem to use for fitting the curve to the givenpoints.Sample points. points)Creates a least squares problem corresponding to the appropriate curve. |
| AbstractCurveFitter | back to summary |
|---|---|
| public AbstractCurveFitter() | |
| fit | back to summary |
|---|---|
| public double[] fit(Collection<WeightedObservedPoint> points) Fits a curve. This method computes the coefficients of the curve that best fit the sample of observed points.
| |
| getOptimizer | back to summary |
|---|---|
| protected LeastSquaresOptimizer getOptimizer() Creates an optimizer set up to fit the appropriate curve.
The default implementation uses a
| |
| getProblem | back to summary |
|---|---|
| protected abstract LeastSquaresProblem getProblem(Collection<WeightedObservedPoint> points) Creates a least squares problem corresponding to the appropriate curve.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ParametricUnivariateFunction | f
Function to fit. |
| private final double[] | points
Observations. |
| Access | Constructor and Description |
|---|---|
| public | TheoreticalValuesFunction(final ParametricUnivariateFunction
function to fit. f, final Collection<WeightedObservedPoint> Observations. observations)
|
| Modifier and Type | Method and Description |
|---|---|
| public MultivariateVectorFunction | |
| public MultivariateMatrixFunction |
| f | back to summary |
|---|---|
| private final ParametricUnivariateFunction f Function to fit. | |
| points | back to summary |
|---|---|
| private final double[] points Observations. | |
| TheoreticalValuesFunction | back to summary |
|---|---|
public TheoreticalValuesFunction(final ParametricUnivariateFunction f, final Collection<WeightedObservedPoint> observations)
| |
| getModelFunction | back to summary |
|---|---|
public MultivariateVectorFunction getModelFunction()
| |
| getModelFunctionJacobian | back to summary |
|---|---|
public MultivariateMatrixFunction getModelFunctionJacobian()
| |