|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.math.statistics.MultipleLinearRegression
public class MultipleLinearRegression
Multiple linear regression attempts to model the relationship between two or more explanatory variables and a response variable by fitting a linear equation to observed data. Every value of the independent variable x is associated with a value of the dependent variable y.
The population regression line for p explanatory variables x1, x2, ... , xp is defined to be y = b0 + b1*x1 + b2*x2 + ... + bp*xp + e.
Field Summary | |
---|---|
private Vector |
b
The (p+1 x 1) - vector holding the estimated b-values (b0, b1, ..., bp)^T. |
private Vector |
e
The (n x 1) - vector holding the estimated residuals (e1, ..., en)^T. |
private double |
ssr
The sum of square residuals |
private double |
sst
The sum of square totals |
private double |
variance
The error variance. |
private Matrix |
x
The (n x p+1)-matrix holding the x-values, where the i-th row has the form (1 x1i ... x1p). |
private Matrix |
xx_inverse
Holds the matrix (x'x)^-1. |
private Vector |
y
The (n x 1) - vector holding the y-values (y1, ..., yn)^T. |
private double |
y_mean
Holds the mean value of the y-values. |
Constructor Summary | |
---|---|
MultipleLinearRegression(Vector y,
Matrix x)
Provides a new multiple linear regression model with the specified parameters. |
Method Summary | |
---|---|
double |
coefficientOfDetermination()
Returns the coefficient of determination |
double |
estimateY(Matrix x)
Perform an estimation of y on the specified matrix. |
Vector |
getEstimatedCoefficients()
Returns the estimated coefficients |
Vector |
getEstimatedResiduals()
Returns the estimated residuals |
double |
getSumOfSquareResiduals()
Returns the sum of square residuals. |
double |
getSumOfSquaresTotal()
Returns the sum of squares total. |
double |
getVariance()
Returns the error variance. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final Vector y
private final double y_mean
private final Matrix x
private final Vector b
private final Vector e
private final double variance
private final Matrix xx_inverse
private final double ssr
private final double sst
Constructor Detail |
---|
public MultipleLinearRegression(Vector y, Matrix x)
y
- the (n x 1) - vector holding the response values (y1, ..., yn)^T.x
- the (n x p+1)-matrix holding the explanatory values, where the
i-th row has the form (1 x1i ... x1p).Method Detail |
---|
public String toString()
toString
in class Object
public double getSumOfSquaresTotal()
public double getSumOfSquareResiduals()
public Vector getEstimatedCoefficients()
public Vector getEstimatedResiduals()
public double coefficientOfDetermination()
public double estimateY(Matrix x)
x
- the matrix for which y is estimated
public double getVariance()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |