Class LinearRegression
- java.lang.Object
-
- com.actelion.research.calc.regression.linear.simple.LinearRegression
-
public class LinearRegression extends java.lang.Object
LinearRegression 2009 MvK: Start implementation
-
-
Constructor Summary
Constructors Constructor Description LinearRegression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoint(double x, double y)
void
addPoint(PointDouble p)
void
addPoint(java.awt.Point p)
add a point to the vector of pointsvoid
calculate()
void
clear()
double
getIntercept()
PointDouble
getMean()
java.util.Vector<PointDouble>
getResiduals()
double
getSlope()
java.util.List<PointDouble>
getValues()
double[][]
getValuesAsArray()
DoubleArray
getValuesAsArrayX()
DoubleArray
getValuesAsArrayY()
double
getXMean()
double
getY(double x)
double
getYMean()
java.util.Vector<PointDouble>
regress()
void
setSlope(double slope)
-
-
-
Method Detail
-
addPoint
public void addPoint(java.awt.Point p)
add a point to the vector of points- Parameters:
p
- the point to be added
-
addPoint
public void addPoint(PointDouble p)
-
addPoint
public void addPoint(double x, double y)
-
clear
public void clear()
-
getValues
public java.util.List<PointDouble> getValues()
-
getValuesAsArray
public double[][] getValuesAsArray()
-
getValuesAsArrayX
public DoubleArray getValuesAsArrayX()
-
getValuesAsArrayY
public DoubleArray getValuesAsArrayY()
-
regress
public java.util.Vector<PointDouble> regress()
-
calculate
public void calculate()
-
getResiduals
public java.util.Vector<PointDouble> getResiduals()
-
getMean
public PointDouble getMean()
-
getIntercept
public double getIntercept()
-
getSlope
public double getSlope()
-
getXMean
public double getXMean()
-
getYMean
public double getYMean()
-
getY
public double getY(double x)
-
setSlope
public void setSlope(double slope)
-
-