Package com.irurueta.numerical.fitting
Class MultiDimensionFitter
java.lang.Object
com.irurueta.numerical.fitting.Fitter
com.irurueta.numerical.fitting.MultiDimensionFitter
- Direct Known Subclasses:
LevenbergMarquardtMultiDimensionFitter
,MultiDimensionLinearFitter
Base class to fit a multi dimension function y = f(x1, x2, ...) by using
provided data (x, y)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double[]
Estimated parameters of linear single dimensional functionprotected double
Estimated chi square value of input dataprotected com.irurueta.algebra.Matrix
Covariance of estimated parameters of linear single dimensional functionprotected int
Number of samples (x, y) in provided input dataprotected double[]
Standard deviations of each pair of points (x, y).protected com.irurueta.algebra.Matrix
Input points x where a multidimensional function f(x1, x2, ...) is evaluated where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of valuesprotected double[]
Result of evaluation of multidimensional function f(x1, x2, ...) at provided x points.Fields inherited from class com.irurueta.numerical.fitting.Fitter
resultAvailable
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructorprotected
MultiDimensionFitter
(com.irurueta.algebra.Matrix x, double[] y, double sig) Constructorprotected
MultiDimensionFitter
(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getA()
Returns estimated parameters of linear single dimensional functiondouble
getChisq()
Returns estimated chi square value of input datacom.irurueta.algebra.Matrix
getCovar()
Returns covariance of estimated parameters of linear single dimensional functiondouble[]
getSig()
Returns standard deviations of each pair of points (x,y).com.irurueta.algebra.Matrix
getX()
Returns input points x where a multidimensional function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of valuesdouble[]
getY()
Returns result of evaluation of multidimensional function f(x) at provided x points.final void
setInputData
(com.irurueta.algebra.Matrix x, double[] y, double sig) Sets required input data to start function fitting and assuming constant standard deviation errors in input datafinal void
setInputData
(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Sets required input data to start function fittingMethods inherited from class com.irurueta.numerical.fitting.Fitter
fit, isReady, isResultAvailable
-
Field Details
-
x
protected com.irurueta.algebra.Matrix xInput points x where a multidimensional function f(x1, x2, ...) is evaluated where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values -
y
protected double[] yResult of evaluation of multidimensional function f(x1, x2, ...) at provided x points. This is provided as input data along x array -
sig
protected double[] sigStandard deviations of each pair of points (x, y). -
ndat
protected int ndatNumber of samples (x, y) in provided input data -
a
protected double[] aEstimated parameters of linear single dimensional function -
covar
protected com.irurueta.algebra.Matrix covarCovariance of estimated parameters of linear single dimensional function -
chisq
protected double chisqEstimated chi square value of input data
-
-
Constructor Details
-
MultiDimensionFitter
protected MultiDimensionFitter()Constructor -
MultiDimensionFitter
protected MultiDimensionFitter(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Constructor- Parameters:
x
- input points x where a multidimensional function f(x1, x2, ...) is evaluatedy
- result of evaluation of multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviations of each pair of points (x, y)- Throws:
IllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
MultiDimensionFitter
protected MultiDimensionFitter(com.irurueta.algebra.Matrix x, double[] y, double sig) Constructor- Parameters:
x
- input points x where a multidimensional function f(x1, x2, ...) is evaluatedy
- result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviation of all pair of points assuming that standard deviations are constant- Throws:
IllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
-
Method Details
-
getX
public com.irurueta.algebra.Matrix getX()Returns input points x where a multidimensional function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values- Returns:
- input point x
-
getY
public double[] getY()Returns result of evaluation of multidimensional function f(x) at provided x points. This is provided as input data along with x array- Returns:
- result of evaluation
-
getSig
public double[] getSig()Returns standard deviations of each pair of points (x,y).- Returns:
- standard deviations of each pair of points (x,y)
-
setInputData
public final void setInputData(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Sets required input data to start function fitting- Parameters:
x
- input points x where a multidimensional function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of valuesy
- result of evaluation of multidimensional function f(x1, x2, ...) at provided x points. This is provided as input data along with x arraysig
- standard deviations of each pair of points (x,y)- Throws:
IllegalArgumentException
- if provided arrays don't have the same size
-
setInputData
public final void setInputData(com.irurueta.algebra.Matrix x, double[] y, double sig) Sets required input data to start function fitting and assuming constant standard deviation errors in input data- Parameters:
x
- input points x where a multidimensional function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of valuesy
- result of evaluation of multidimensional function f(x1, x2, ...) at provided x points. This is provided as input data along with x arraysig
- standard deviation of all pair of points assuming that standard deviations are constant- Throws:
IllegalArgumentException
- if provided arrays don't have the same size
-
getA
public double[] getA()Returns estimated parameters of linear single dimensional function- Returns:
- estimated parameters
-
getCovar
public com.irurueta.algebra.Matrix getCovar()Returns covariance of estimated parameters of linear single dimensional function- Returns:
- covariance of estimated parameters
-
getChisq
public double getChisq()Returns estimated chi square value of input data- Returns:
- estimated chi square value of input data
-