Class LinearRegression
- java.lang.Object
-
- com.actelion.research.calc.regression.linear.simple.LinearRegression
-
public class LinearRegression extends java.lang.ObjectLinearRegression 2009 MvK: Start implementation
-
-
Constructor Summary
Constructors Constructor Description LinearRegression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoint(double x, double y)voidaddPoint(PointDouble p)voidaddPoint(java.awt.Point p)add a point to the vector of pointsvoidcalculate()voidclear()doublegetIntercept()PointDoublegetMean()java.util.Vector<PointDouble>getResiduals()doublegetSlope()java.util.List<PointDouble>getValues()double[][]getValuesAsArray()DoubleArraygetValuesAsArrayX()DoubleArraygetValuesAsArrayY()doublegetXMean()doublegetY(double x)doublegetYMean()java.util.Vector<PointDouble>regress()voidsetSlope(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)
-
-