public class PolynomialRegression extends java.lang.Object implements ISimpleRegression
| Constructor and Description |
|---|
PolynomialRegression(double[] x,
double[] y)
Initializes a new instance of the PolynomialRegression class.
|
PolynomialRegression(double[] x,
double[] y,
int degree)
Initializes a new instance of the PolynomialRegression class.
|
| Modifier and Type | Method and Description |
|---|---|
double |
CoefficientOfDetermination()
Get the R^2.
|
int |
getDegree()
Get degree.
|
double |
Regression(double x)
Compute regression of specific value.
|
double[] |
Regression(double[] x)
Compute regression in the vector.
|
void |
setDegree(int degree)
Set degree.
|
java.lang.String |
toString()
Show the regression's equation.
|
public PolynomialRegression(double[] x,
double[] y)
x - Data.y - Data.public PolynomialRegression(double[] x,
double[] y,
int degree)
x - Data.y - Data.degree - Degree.public int getDegree()
public void setDegree(int degree)
degree - Degree.public double Regression(double x)
ISimpleRegressionRegression in interface ISimpleRegressionx - Value.public double[] Regression(double[] x)
ISimpleRegressionRegression in interface ISimpleRegressionx - Vector.public double CoefficientOfDetermination()
ISimpleRegressionCoefficientOfDetermination in interface ISimpleRegressionpublic java.lang.String toString()
ISimpleRegressiontoString in interface ISimpleRegressiontoString in class java.lang.Object