public abstract class Regression extends java.lang.Object
Constructor and Description |
---|
Regression() |
Modifier and Type | Method and Description |
---|---|
static double[] |
getOLSRegression(double[][] data)
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to
the data using ordinary least squares regression.
|
static double[] |
getOLSRegression(XYDataset data,
int series)
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to
the data using ordinary least squares regression.
|
static double[] |
getPolynomialRegression(XYDataset dataset,
int series,
int order)
Returns the parameters 'a0', 'a1', 'a2', ..., 'an' for a polynomial
function of order n, y = a0 + a1 * x + a2 * x^2 + ...
|
static double[] |
getPowerRegression(double[][] data)
Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to
the data using a power regression equation.
|
static double[] |
getPowerRegression(XYDataset data,
int series)
Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to
the data using a power regression equation.
|
public Regression()
public static double[] getOLSRegression(double[][] data)
data
- the data.public static double[] getOLSRegression(XYDataset data, int series)
data
- the data.series
- the series (zero-based index).public static double[] getPowerRegression(double[][] data)
data
- the data.public static double[] getPowerRegression(XYDataset data, int series)
data
- the data.series
- the series to fit the regression line against.public static double[] getPolynomialRegression(XYDataset dataset, int series, int order)
dataset
- the dataset (null
not permitted).series
- the series to fit the regression line against (the series
must have at least order + 1 non-NaN items).order
- the order of the function (> 0).