Class LinearRegression

  • All Implemented Interfaces:
    Minimizer.Func

    @Deprecated
    public class LinearRegression
    extends java.lang.Object
    implements Minimizer.Func
    Deprecated.

    NOTE: DO NOT USE THIS CLASS. IT'S ONLY KEPT FOR REFERENCE. The error term is calculated using the perpendicular distance. This is LESS robust for determining the slope/intercept form of a line than minimizing the vertical distance (i.e. the error in the 'y' term only). because the starting point cannot be rotated through the Y axis. As an example, if the slope of the points is approximately -3.0 and the slope of the starting iteration is 3.0, then RAISING the slope lowers the perpendicular distance. This moves the iterations in the wrong direction.

    This class will do a linear regression by minimizing the squared error between the points provided to the constructor and the line specified by y = m[0]x + m[1]
    • Constructor Summary

      Constructors 
      Constructor Description
      LinearRegression​(double[] x, double[] y)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      double func​(double[] lineDefMb)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LinearRegression

        public LinearRegression​(double[] x,
                                double[] y)
        Deprecated.
    • Method Detail

      • func

        public double func​(double[] lineDefMb)
        Deprecated.
        Specified by:
        func in interface Minimizer.Func