Package gov.nih.mipav.model.algorithms
Class FitLine
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.NLConstrainedEngine
-
- gov.nih.mipav.model.algorithms.NLFittedFunction
-
- gov.nih.mipav.model.algorithms.FitLine
-
public class FitLine extends NLFittedFunction
y = mx + b;.
-
-
Field Summary
-
Fields inherited from class gov.nih.mipav.model.algorithms.NLFittedFunction
chisq, EPSILON, MAX_ITR, MIN_ITR, xSeries, yDataFitted, ySeries
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateChiSq()
Calculates chi squaredprotected void
calculateFittedY()
Calculates yDataFittedvoid
displayResults()
Display results of displaying linear fitting parameters.void
fitToFunction(double[] a, double[] residuals, double[][] jacobian)
Fit line to function.protected 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 iterationprivate void
setupData()
Sets up data to test fitting of exponential.-
Methods inherited from class gov.nih.mipav.model.algorithms.NLFittedFunction
getChisq, getFittedY, getMedian
-
Methods inherited from class gov.nih.mipav.model.algorithms.NLConstrainedEngine
driver, dumpTestResults, fitToTestFunction, getChiSquared, getExitStatus, getIterations, getParameters, getResiduals, statusMessage
-
-
-
-
Method Detail
-
displayResults
public void displayResults()
Display results of displaying linear fitting parameters.- Specified by:
displayResults
in classNLFittedFunction
-
fitToFunction
public void fitToFunction(double[] a, double[] residuals, double[][] jacobian)
Fit line to function.- Specified by:
fitToFunction
in classNLConstrainedEngine
- 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 exponential.
-
calculateFittedY
protected void calculateFittedY()
Description copied from class:NLFittedFunction
Calculates yDataFitted- Specified by:
calculateFittedY
in classNLFittedFunction
-
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 classNLFittedFunction
- Returns:
-
calculateChiSq
protected void calculateChiSq()
Description copied from class:NLFittedFunction
Calculates chi squared- Specified by:
calculateChiSq
in classNLFittedFunction
-
-