Class FitRayleigh


  • public class FitRayleigh
    extends NLFittedFunction
    For -infinity < a < +infinity and b > 0 y = scale factor * (2/b)*(x - a)*exp(-((x-a)**2)/b)*u(x - a) where u(x-a) = 0 for x < a and = 1 for x >= a. cumulative function = [1 - exp(-((x-a)**2)/b)]*u(x-a) Mean of x = a + sqrt(PI*b/4) Variance of x = b*(4 - PI)/4
    • Constructor Detail

      • FitRayleigh

        public FitRayleigh()
        Creates a new FitRayleigh object.
      • FitRayleigh

        public FitRayleigh​(int nPoints,
                           float[] xData,
                           float[] yData)
        FitRayleigh.
        Parameters:
        nPoints - number of points in the function
        xData - DOCUMENT ME!
        yData - DOCUMENT ME!
    • Method Detail

      • displayResults

        public void displayResults()
        Display results of displaying linear fitting parameters.
        Specified by:
        displayResults in class NLFittedFunction
      • fitToFunction

        public void fitToFunction​(double[] a,
                                  double[] residuals,
                                  double[][] jacobian)
        Fit Rayleigh to function.
        Specified by:
        fitToFunction in class NLConstrainedEngine
        Parameters:
        a - The best guess parameter values.
        residuals - ymodel - yData.
        jacobian - The derivative values of y with respect to fitting parameters.
      • setupData

        private void setupData()
        Sets up data to test fitting of Rayleigh distribution.
      • generateResiduals

        protected Jama.Matrix generateResiduals()
        Description copied from class: NLFittedFunction
        Calculates the residuals for a given function, not implemented since some functions might prefer to only use a subset of data points, or not use yDataFitted if working during an iteration
        Specified by:
        generateResiduals in class NLFittedFunction
        Returns: