Class PolynomialsLeastSquaresFitterResult


  • public class PolynomialsLeastSquaresFitterResult
    extends Object
    Contains the result of a least squares regression for polynomial.
    • Constructor Detail

      • PolynomialsLeastSquaresFitterResult

        public PolynomialsLeastSquaresFitterResult​(double[] coefficients,
                                                   DoubleMatrix rMatrix,
                                                   int dof,
                                                   double diffNorm)
        Parameters:
        coefficients - Coefficients of the polynomial
        rMatrix - R-matrix of the QR decomposition used in PolynomialsLeastSquaresRegression
        dof - 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 PolynomialsLeastSquaresRegression
        dof - 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