public abstract class CurveFitter extends Object implements ICurveFitter
| Modifier and Type | Field and Description |
|---|---|
protected int |
components |
protected double |
currentRCSE |
protected int[] |
curveData |
protected double[][] |
curveEstimate |
protected boolean[][] |
curveFixed |
protected static boolean |
DEBUG |
protected int |
firstIndex |
protected int |
lastIndex |
| Constructor and Description |
|---|
CurveFitter() |
| Modifier and Type | Method and Description |
|---|---|
void |
estimate()
Initializes the curve fitter with a starting curve estimate.
|
double |
getChiSquaredError()
Returns the Chi Squared Error of the current curve estimate.
|
double |
getChiSquaredError(double[][] estCurve) |
int |
getComponentCount()
Returns the number of exponentials to be fitted.
|
double[][] |
getCurve()
Returns the current curve estimate.
|
int[] |
getData()
Gets the data to be used to generate curve estimates.
|
double[] |
getEstimates(double[][] estimate) |
int |
getFirst() |
boolean[][] |
getFixed()
For each parameter, gets whether it should be fixed at the current value,
or allowed to iterate toward an optimal value.
|
abstract int |
getIterations()
Returns the number of iterations so far.
|
int |
getLast() |
double |
getReducedChiSquaredError()
Returns the Reduced Chi Squared Error of the current curve estimate
This is based on the number of dataPoints in data and the number
of exponentials in setComponentCount.
|
double |
getReducedChiSquaredError(double[][] estCurve) |
abstract void |
iterate()
iterate() runs through one iteration of whatever curve fitting
technique this curve fitter uses.
|
void |
setComponentCount(int numExp)
Sets how many exponentials are expected to be fitted.
|
void |
setCurve(double[][] curve)
Sets the current curve estimate, useful if information about the
curve is already known.
|
void |
setData(int[] data)
Sets the data to be used to generate curve estimates.
|
void |
setData(int[] data,
int first,
int last) |
void |
setFixed(boolean[][] fixed)
For each parameter, sets whether it should be fixed at the current value,
or allowed to iterate toward an optimal value.
|
protected static final boolean DEBUG
protected int components
protected int[] curveData
protected double[][] curveEstimate
protected boolean[][] curveFixed
protected int firstIndex
protected int lastIndex
protected double currentRCSE
public abstract void iterate()
iterate in interface ICurveFitterpublic abstract int getIterations()
getIterations in interface ICurveFitterpublic double getChiSquaredError()
getChiSquaredError in interface ICurveFitterpublic double getChiSquaredError(double[][] estCurve)
getChiSquaredError in interface ICurveFitterpublic double getReducedChiSquaredError()
getReducedChiSquaredError in interface ICurveFitterpublic double getReducedChiSquaredError(double[][] estCurve)
getReducedChiSquaredError in interface ICurveFitterpublic double[] getEstimates(double[][] estimate)
getEstimates in interface ICurveFitterpublic void setData(int[] data)
setData in interface ICurveFitterpublic void setData(int[] data,
int first,
int last)
setData in interface ICurveFitterpublic int[] getData()
getData in interface ICurveFitterpublic int getFirst()
getFirst in interface ICurveFitterpublic int getLast()
getLast in interface ICurveFitterpublic void setComponentCount(int numExp)
setComponentCount in interface ICurveFitterpublic int getComponentCount()
getComponentCount in interface ICurveFitterpublic void setFixed(boolean[][] fixed)
ICurveFittersetFixed in interface ICurveFitterpublic boolean[][] getFixed()
ICurveFittergetFixed in interface ICurveFitterpublic void estimate()
estimate in interface ICurveFitterpublic double[][] getCurve()
getCurve in interface ICurveFitterpublic void setCurve(double[][] curve)
setCurve in interface ICurveFitterCopyright © 2015–2022 SciJava. All rights reserved.