Class HarmonicCurveFitter.ParameterGuesser
- Enclosing class:
- HarmonicCurveFitter
The algorithm used to guess the coefficients is as follows:
We know
From the analytical expression, we can compute two primitives :
We can remove
The preceding expression shows that
From the primitive, we can deduce the same form for definite
integrals between
We can find the coefficients
For a bilinear expression
In fact, we can assume that both
Once we know
It appears that
Since integrals and means are involved in the preceding
estimations, these operations run in
-
Constructor Summary
ConstructorsConstructorDescriptionParameterGuesser
(Collection<WeightedObservedPoint> observations) Simple constructor. -
Method Summary
-
Constructor Details
-
ParameterGuesser
Simple constructor.- Parameters:
observations
- Sampled observations.- Throws:
MathIllegalArgumentException
- if the sample is too short.MathIllegalArgumentException
- if the abscissa range is zero.MathIllegalStateException
- when the guessing procedure cannot produce sensible results.
-
-
Method Details
-
guess
public double[] guess()Gets an estimation of the parameters.- Returns:
- the guessed parameters, in the following order:
- Amplitude
- Angular frequency
- Phase
-