Package arc.math

Class LinearRegression

java.lang.Object
arc.math.LinearRegression

public class LinearRegression extends Object
  • Field Details

    • intercept

      public float intercept
    • slope

      public float slope
  • Constructor Details

    • LinearRegression

      public LinearRegression()
  • Method Details

    • calculate

      public void calculate(Seq<Vec2> v)
      Performs a linear regression on the data points.
    • predict

      public float predict(float x)
      Returns:
      the expected response y given the value of the predictor variable x.