public class PolynomialsLeastSquaresFitter extends Object
| Constructor and Description |
|---|
PolynomialsLeastSquaresFitter() |
| Modifier and Type | Method and Description |
|---|---|
LeastSquaresRegressionResult |
regress(double[] xData,
double[] yData,
int degree)
Given a set of data (X_i, Y_i) and degrees of a polynomial, determines optimal coefficients of the polynomial.
|
PolynomialsLeastSquaresFitterResult |
regressVerbose(double[] xData,
double[] yData,
int degree,
boolean normalize)
Alternative regression method with different output.
|
public LeastSquaresRegressionResult regress(double[] xData, double[] yData, int degree)
xData - X values of datayData - Y values of datadegree - Degree of polynomial which fits the given datapublic PolynomialsLeastSquaresFitterResult regressVerbose(double[] xData, double[] yData, int degree, boolean normalize)
xData - X values of datayData - Y values of datadegree - Degree of polynomial which fits the given datanormalize - Normalize xData by mean and standard deviation if normalize == trueCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.