edu.harvard.seas.iis.util.stats
Class LinearRegressionCalculator
java.lang.Object
edu.harvard.seas.iis.util.stats.LinearRegressionCalculator
public class LinearRegressionCalculator
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearRegressionCalculator
public LinearRegressionCalculator()
setData
public void setData(double[] x,
double[] y)
getIntercept
public double getIntercept()
getSlope
public double getSlope()
computeLinearRegressionParameters
public static double[] computeLinearRegressionParameters(double[] x,
double[] y)
- Computes linear regression coefficients
- Parameters:
x
- y
-
- Returns:
- [intercept, slope]