GaussianFitter (Apache Commons Math 3.3 API)

org.apache.commons.math3.optimization.fitting

## Class GaussianFitter

- java.lang.Object
- - org.apache.commons.math3.optimization.fitting.CurveFitter<Gaussian.Parametric>
  - - org.apache.commons.math3.optimization.fitting.GaussianFitter

- Deprecated.
  As of 3.1 (to be removed in 4.0).

      @Deprecated
      public class GaussianFitter
      extends CurveFitter<Gaussian.Parametric>

  Fits points to a `Gaussian` function.

  Usage example:

         GaussianFitter fitter = new GaussianFitter(
           new LevenbergMarquardtOptimizer());
         fitter.addObservedPoint(4.0254623,  531026.0);
         fitter.addObservedPoint(4.03128248, 984167.0);
         fitter.addObservedPoint(4.03839603, 1887233.0);
         fitter.addObservedPoint(4.04421621, 2687152.0);
         fitter.addObservedPoint(4.05132976, 3461228.0);
         fitter.addObservedPoint(4.05326982, 3580526.0);
         fitter.addObservedPoint(4.05779662, 3439750.0);
         fitter.addObservedPoint(4.0636168,  2877648.0);
         fitter.addObservedPoint(4.06943698, 2175960.0);
         fitter.addObservedPoint(4.07525716, 1447024.0);
         fitter.addObservedPoint(4.08237071, 717104.0);
         fitter.addObservedPoint(4.08366408, 620014.0);
         double[] parameters = fitter.fit();

  Since:
    2.2
  Version:
    $Id: GaussianFitter.java 1422230 2012-12-15 12:11:13Z erans $

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GaussianFitter.ParameterGuesser` Deprecated. Guesses the parameters `norm`, `mean`, and `sigma` of a `Gaussian.Parametric` based on the specified observed points.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GaussianFitter(DifferentiableMultivariateVectorOptimizer optimizer)` Deprecated. Constructs an instance using the specified optimizer.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double[]` | `fit()` Deprecated. Fits a Gaussian function to the observed points.
    `double[]` | `fit(double[] initialGuess)` Deprecated. Fits a Gaussian 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

    - #### GaussianFitter

          public GaussianFitter(DifferentiableMultivariateVectorOptimizer optimizer)

      Deprecated.
      Constructs an instance using the specified optimizer.
      Parameters:
        `optimizer` - Optimizer to use for the fitting.

  - ### Method Detail

    - #### fit

          public double[] fit(double[] initialGuess)

      Deprecated.
      Fits a Gaussian function to the observed points.
      Parameters:
        `initialGuess` - First guess values in the following order:
        - Norm
        - Mean
        - Sigma
      Returns:
        the parameters of the Gaussian function that best fits the observed points (in the same order as above).
      Since:
        3.0

    - #### fit

          public double[] fit()

      Deprecated.
      Fits a Gaussian function to the observed points.
      Returns:
        the parameters of the Gaussian function that best fits the observed points (in the same order as above).

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.