Class FitMultiExponential


  • public class FitMultiExponential
    extends NLFittedFunction
    FitMultiExponential -fits an array of points to an multiexponential of the type y = a0 + a1*exp(a2*x) + a3*exp(a4*x) + ... where all the exponentials are negative decaying exponentials.
    Version:
    0.9
    Author:
    William Gandler
    See Also:
    NLConstrainedEngine
    • Constructor Detail

      • FitMultiExponential

        public FitMultiExponential()
        FitMultiExponential - test constructor, builds and test function.
      • FitMultiExponential

        public FitMultiExponential​(int nPoints,
                                   int nCoefficients,
                                   double[] xData,
                                   double[] yData)
        FitMultiExponential assuming all exponentials are negative
        Parameters:
        nPoints - number of points in the function
        nCoefficients - number of variables in the function
        xData - DOCUMENT ME!
        yData - DOCUMENT ME!
      • FitMultiExponential

        public FitMultiExponential​(int nPoints,
                                   int nCoefficients,
                                   float[] xData,
                                   float[] yData)
        Constructs new fit multiexponential assuming all exponentials are negative.
        Parameters:
        nPoints - Number of points in the function
        nCoefficients - Number of variables in the function
        xData - DOCUMENT ME!
        yData - DOCUMENT ME!
    • Method Detail

      • displayResults

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

        public void fitToFunction​(double[] a,
                                  double[] residuals,
                                  double[][] covarMat)
        Fit to function - a0 + a1*exp(a2*x) + a3*exp(a4*x) + ...
        Specified by:
        fitToFunction in class NLConstrainedEngine
        Parameters:
        a - The best guess parameter values.
        residuals - ymodel - yData.
        covarMat - The derivative values of y with respect to fitting parameters.
      • testData

        private void testData()
        Test data to test fitting of exponential.
      • 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: