Class OLSTrendLine
- java.lang.Object
-
- org.hortonmachine.gears.utils.math.regressions.OLSTrendLine
-
- All Implemented Interfaces:
RegressionLine
- Direct Known Subclasses:
ExpTrendLine,LogTrendLine,PolyTrendLine,PowerTrendLine
public abstract class OLSTrendLine extends Object implements RegressionLine
Taken from https://stackoverflow.com/questions/17592139/trend-lines-regression-curve-fitting-java-library
-
-
Constructor Summary
Constructors Constructor Description OLSTrendLine()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double[]getRegressionParameters()double[]getRegressionParametersErrors()double[]getResiduals()doublegetRSquared()protected abstract booleanlogY()doublepredict(double x)voidsetValues(double[] y, double[] x)protected abstract double[]xVector(double x)
-
-
-
Method Detail
-
xVector
protected abstract double[] xVector(double x)
-
logY
protected abstract boolean logY()
-
setValues
public void setValues(double[] y, double[] x)- Specified by:
setValuesin interfaceRegressionLine
-
getRegressionParameters
public double[] getRegressionParameters()
- Specified by:
getRegressionParametersin interfaceRegressionLine
-
getRegressionParametersErrors
public double[] getRegressionParametersErrors()
- Specified by:
getRegressionParametersErrorsin interfaceRegressionLine
-
getRSquared
public double getRSquared()
- Specified by:
getRSquaredin interfaceRegressionLine
-
getResiduals
public double[] getResiduals()
- Specified by:
getResidualsin interfaceRegressionLine
-
predict
public double predict(double x)
- Specified by:
predictin interfaceRegressionLine
-
-