Package gov.nih.mipav.model.algorithms
Class NLFittedFunction
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.NLConstrainedEngine
-
- gov.nih.mipav.model.algorithms.NLFittedFunction
-
- Direct Known Subclasses:
FitExponential
,FitGaussian
,FitLaplace
,FitLine
,FitLorentz
,FitMultiExponential
,FitRayleigh
public abstract class NLFittedFunction extends NLConstrainedEngine
-
-
Field Summary
Fields Modifier and Type Field Description protected double
chisq
Total error as X^2static double
EPSILON
Minimum allowable distance between iterations of a coefficient before considered converged.static int
MAX_ITR
Max number of iterations to perform.static int
MIN_ITR
Min number of iterations to perform.protected double[]
xSeries
Original xDataprotected double[]
yDataFitted
Fitted y-data, based on original x points.protected double[]
ySeries
Original y data-
Fields inherited from class gov.nih.mipav.model.algorithms.NLConstrainedEngine
a, absoluteConvergence, analyticalJacobian, bl, bounds, bu, ctrlMat, dyda, gues, internalScaling, iters, jacobian, maxIterations, nPts, outputMes, param, parameterConvergence, relativeConvergence, residuals, secondAllowed, stdv, tolerance
-
-
Constructor Summary
Constructors Constructor Description NLFittedFunction(int pts, int _ma)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
calculateChiSq()
Calculates chi squaredprotected abstract void
calculateFittedY()
Calculates yDataFittedabstract void
displayResults()
Displays results in a panel with relevant parameters.protected abstract Jama.Matrix
generateResiduals()
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 iterationdouble
getChisq()
double[]
getFittedY()
protected double
getMedian(double[] toSort)
get median of given array-
Methods inherited from class gov.nih.mipav.model.algorithms.NLConstrainedEngine
driver, dumpTestResults, fitToFunction, fitToTestFunction, getChiSquared, getExitStatus, getIterations, getParameters, getResiduals, statusMessage
-
-
-
-
Field Detail
-
MAX_ITR
public static final int MAX_ITR
Max number of iterations to perform.- See Also:
- Constant Field Values
-
MIN_ITR
public static final int MIN_ITR
Min number of iterations to perform.- See Also:
- Constant Field Values
-
EPSILON
public static final double EPSILON
Minimum allowable distance between iterations of a coefficient before considered converged.- See Also:
- Constant Field Values
-
xSeries
protected double[] xSeries
Original xData
-
ySeries
protected double[] ySeries
Original y data
-
chisq
protected double chisq
Total error as X^2
-
yDataFitted
protected double[] yDataFitted
Fitted y-data, based on original x points.
-
-
Method Detail
-
getFittedY
public double[] getFittedY()
-
calculateChiSq
protected abstract void calculateChiSq()
Calculates chi squared
-
calculateFittedY
protected abstract void calculateFittedY()
Calculates yDataFitted
-
displayResults
public abstract void displayResults()
Displays results in a panel with relevant parameters.
-
getChisq
public double getChisq()
-
getMedian
protected double getMedian(double[] toSort)
get median of given array
-
generateResiduals
protected abstract Jama.Matrix generateResiduals()
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- Returns:
-
-