Class PolynomialsLeastSquaresFitterResult
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PolynomialsLeastSquaresFitterResult
-
public class PolynomialsLeastSquaresFitterResult extends Object
Contains the result of a least squares regression for polynomial.
-
-
Constructor Summary
Constructors Constructor Description PolynomialsLeastSquaresFitterResult(double[] coefficients, DoubleMatrix rMatrix, int dof, double diffNorm)
PolynomialsLeastSquaresFitterResult(double[] coefficients, DoubleMatrix rMatrix, int dof, double diffNorm, double[] meanAndStd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCoeff()
double
getDiffNorm()
int
getDof()
double[]
getMeanAndStd()
DoubleMatrix
getRMat()
-
-
-
Constructor Detail
-
PolynomialsLeastSquaresFitterResult
public PolynomialsLeastSquaresFitterResult(double[] coefficients, DoubleMatrix rMatrix, int dof, double diffNorm)
- Parameters:
coefficients
- Coefficients of the polynomialrMatrix
- R-matrix of the QR decomposition used in PolynomialsLeastSquaresRegressiondof
- Degrees of freedom = Number of data points - (degrees of Polynomial + 1)diffNorm
- Square norm of the vector, "residuals," whose components are yData_i - f(xData_i)
-
PolynomialsLeastSquaresFitterResult
public PolynomialsLeastSquaresFitterResult(double[] coefficients, DoubleMatrix rMatrix, int dof, double diffNorm, double[] meanAndStd)
- Parameters:
coefficients
- Coefficients {a_0, a_1, a_2 ...} of the polynomial a_0 + a_1 x^1 + a_2 x^2 + ....rMatrix
- R-matrix of the QR decomposition used in PolynomialsLeastSquaresRegressiondof
- Degrees of freedom = Number of data points - (degrees of Polynomial + 1)diffNorm
- Norm of the vector, "residuals," whose components are yData_i - f(xData_i)meanAndStd
- Vector (mean , standard deviation) used in normalization
-
-
Method Detail
-
getCoeff
public double[] getCoeff()
- Returns:
- Coefficients {a_0, a_1, a_2 ...} of polynomial a_0 + a_1 x^1 + a_2 x^2 + ....
-
getRMat
public DoubleMatrix getRMat()
- Returns:
- R Matrix of QR decomposition
-
getDof
public int getDof()
- Returns:
- Degrees of freedom = Number of data points - (degrees of Polynomial + 1)
-
getDiffNorm
public double getDiffNorm()
- Returns:
- Norm of the vector, "residuals," whose components are yData_i - f(xData_i)
-
getMeanAndStd
public double[] getMeanAndStd()
- Returns:
- Vector (mean , standard deviation) used in normalization
-
-