Class LeastSquareResults
- java.lang.Object
-
- com.opengamma.strata.math.impl.statistics.leastsquare.LeastSquareResults
-
- Direct Known Subclasses:
GeneralizedLeastSquareResults
,LeastSquareResultsWithTransform
,LeastSquareWithPenaltyResults
public class LeastSquareResults extends Object
Container for the results of a least square (minimum chi-square) fit, where some model (with a set of parameters), is calibrated to a data set.
-
-
Constructor Summary
Constructors Constructor Description LeastSquareResults(double chiSq, DoubleArray parameters, DoubleMatrix covariance)
LeastSquareResults(double chiSq, DoubleArray parameters, DoubleMatrix covariance, DoubleMatrix inverseJacobian)
LeastSquareResults(LeastSquareResults from)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getChiSq()
Gets the Chi-square of the fit.DoubleMatrix
getCovariance()
Gets the estimated covariance matrix of the standard errors in the fitting parameters.DoubleArray
getFitParameters()
Gets the value of the fitting parameters, when the chi-squared is minimised.DoubleMatrix
getFittingParameterSensitivityToData()
This a matrix where the i,jth element is the (infinitesimal) sensitivity of the ith fitting parameter to the jth data point (NOT the model point), when the fitting parameter are such that the chi-squared is minimised.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
LeastSquareResults
public LeastSquareResults(LeastSquareResults from)
-
LeastSquareResults
public LeastSquareResults(double chiSq, DoubleArray parameters, DoubleMatrix covariance)
-
LeastSquareResults
public LeastSquareResults(double chiSq, DoubleArray parameters, DoubleMatrix covariance, DoubleMatrix inverseJacobian)
-
-
Method Detail
-
getChiSq
public double getChiSq()
Gets the Chi-square of the fit.- Returns:
- the chiSq
-
getFitParameters
public DoubleArray getFitParameters()
Gets the value of the fitting parameters, when the chi-squared is minimised.- Returns:
- the parameters
-
getCovariance
public DoubleMatrix getCovariance()
Gets the estimated covariance matrix of the standard errors in the fitting parameters. Note only in the case of normally distributed errors, does this have any meaning full mathematical interpretation (See NR third edition, p812-816)- Returns:
- the formal covariance matrix
-
getFittingParameterSensitivityToData
public DoubleMatrix getFittingParameterSensitivityToData()
This a matrix where the i,jth element is the (infinitesimal) sensitivity of the ith fitting parameter to the jth data point (NOT the model point), when the fitting parameter are such that the chi-squared is minimised. So it is a type of (inverse) Jacobian, but should not be confused with the model jacobian (sensitivity of model data points, to parameters) or its inverse.- Returns:
- a matrix
-
-