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 ICurveFitter
public abstract int getIterations()
getIterations
in interface ICurveFitter
public double getChiSquaredError()
getChiSquaredError
in interface ICurveFitter
public double getChiSquaredError(double[][] estCurve)
getChiSquaredError
in interface ICurveFitter
public double getReducedChiSquaredError()
getReducedChiSquaredError
in interface ICurveFitter
public double getReducedChiSquaredError(double[][] estCurve)
getReducedChiSquaredError
in interface ICurveFitter
public double[] getEstimates(double[][] estimate)
getEstimates
in interface ICurveFitter
public void setData(int[] data)
setData
in interface ICurveFitter
public void setData(int[] data, int first, int last)
setData
in interface ICurveFitter
public int[] getData()
getData
in interface ICurveFitter
public int getFirst()
getFirst
in interface ICurveFitter
public int getLast()
getLast
in interface ICurveFitter
public void setComponentCount(int numExp)
setComponentCount
in interface ICurveFitter
public int getComponentCount()
getComponentCount
in interface ICurveFitter
public void setFixed(boolean[][] fixed)
ICurveFitter
setFixed
in interface ICurveFitter
public boolean[][] getFixed()
ICurveFitter
getFixed
in interface ICurveFitter
public void estimate()
estimate
in interface ICurveFitter
public double[][] getCurve()
getCurve
in interface ICurveFitter
public void setCurve(double[][] curve)
setCurve
in interface ICurveFitter
Copyright © 2015–2022 SciJava. All rights reserved.