|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.optimization.fitting.CurveFitter<HarmonicOscillator.Parametric> org.apache.commons.math3.optimization.fitting.HarmonicFitter
@Deprecated public class HarmonicFitter
Class that implements a curve fitting specialized for sinusoids.
Harmonic fitting is a very simple case of curve fitting. The
estimated coefficients are the amplitude a, the pulsation ω and
the phase φ: f (t) = a cos (ω t + φ)
. They are
searched by a least square estimator initialized with a rough guess
based on integrals.
Nested Class Summary | |
---|---|
static class |
HarmonicFitter.ParameterGuesser
Deprecated. This class guesses harmonic coefficients from a sample. |
Constructor Summary | |
---|---|
HarmonicFitter(DifferentiableMultivariateVectorOptimizer optimizer)
Deprecated. Simple constructor. |
Method Summary | |
---|---|
double[] |
fit()
Deprecated. Fit an harmonic function to the observed points. |
double[] |
fit(double[] initialGuess)
Deprecated. Fit an harmonic function to the observed points. |
Methods inherited from class org.apache.commons.math3.optimization.fitting.CurveFitter |
---|
addObservedPoint, addObservedPoint, addObservedPoint, clearObservations, fit, fit, getObservations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HarmonicFitter(DifferentiableMultivariateVectorOptimizer optimizer)
optimizer
- Optimizer to use for the fitting.Method Detail |
---|
public double[] fit(double[] initialGuess)
initialGuess
- First guess values in the following order:
public double[] fit()
fit
method.
NumberIsTooSmallException
- if the sample is too short for the
the first guess to be computed.
ZeroException
- if the first guess cannot be computed because
the abscissa range is zero.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |