public class LinearRegression extends Object implements org.openimaj.math.model.EstimatableModel<double[],double[]>
| Constructor and Description |
|---|
LinearRegression()
linear regression model
|
| Modifier and Type | Method and Description |
|---|---|
LinearRegression |
clone() |
boolean |
equals(Object obj) |
void |
estimate(double[][] yd,
double[][] xd)
As in
estimate(List) but using double arrays for efficiency. |
boolean |
estimate(List<? extends org.openimaj.util.pair.IndependentPair<double[],double[]>> data) |
void |
estimate(Jama.Matrix y,
Jama.Matrix x)
As in
estimate(List) but using double arrays for efficiency. |
int |
numItemsToEstimate() |
double[] |
predict(double[] data) |
Jama.Matrix |
predict(Jama.Matrix x)
Helper function which adds the constant component to x and returns
predicted values for y, one per row
|
String |
toString() |
public LinearRegression()
public boolean estimate(List<? extends org.openimaj.util.pair.IndependentPair<double[],double[]>> data)
estimate in interface org.openimaj.math.model.EstimatableModel<double[],double[]>public void estimate(double[][] yd, double[][] xd)
estimate(List) but using double arrays for efficiency.yd - xd - public void estimate(Jama.Matrix y, Jama.Matrix x)
estimate(List) but using double arrays for efficiency.
Estimates: b = V D^{-1} U^{T} y s.t. X = UDV^{T}y - x - public double[] predict(double[] data)
predict in interface org.openimaj.math.model.Model<double[],double[]>public Jama.Matrix predict(Jama.Matrix x)
x - public int numItemsToEstimate()
numItemsToEstimate in interface org.openimaj.math.model.EstimatableModel<double[],double[]>public LinearRegression clone()