public class PolynomialRegression extends MultipleLinearRegression
Modifier and Type | Field and Description |
---|---|
int |
p
The order of the polynom.
|
Constructor and Description |
---|
PolynomialRegression(Vector y,
Vector x,
int p)
Provides a new polynomial regression model with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
double |
adaptedCoefficientOfDetermination()
Returns the adapted coefficient of determination
|
double |
estimateY(double x)
Performs an estimation of y on the specified x value.
|
private static Matrix |
xMatrix(Vector x,
int p) |
coefficientOfDetermination, estimateY, getEstimatedCoefficients, getEstimatedResiduals, getSumOfSquareResiduals, getSumOfSquaresTotal, getVariance, toString
public PolynomialRegression(Vector y, Vector x, int p)
y
- the (n x 1) - vector holding the response values (y1, ..., yn)^T.x
- the (n x 1)-vector holding the x-values (x1, ..., xn)^T.p
- the order of the polynom.public double adaptedCoefficientOfDetermination()
public double estimateY(double x)
x
- the x-value for which y is estimated