Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8306732

TruncatedSeq::predict_next() attempts linear regression with only one data point

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • hotspot
    • gc
    • b21

      TruncatedSeq::predict_next() attempts linear regression with only one data point, this leads to a division by zero. (There are infinit many linear functions that fit equally well for a single point).

      I suggest we do what we do for the zero points case, namely pick one of the linear functions.

      For 0 points the current version picks `y = 0 + 0*x` and the suggestion is that for one point `P` the function `y = P_y + 0*x` is picked.

            aboldtch Axel Boldt-Christmas
            aboldtch Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: