private void linearRegress(int start, int end) {
    double[][] data = new double[getWindowSize()][2];
    for (int i = start; i < end; i++) {
      data[i - start][0] = (double) timeWindow.get(i) - startTime;
      data[i - start][1] = valueWindow.get(i);
    }
    regression.addData(data);
  }
Streaming anomaly detection for anomalies of data missing.
library-udf/src/main/java/org/apache/iotdb/library/anomaly/util/StreamMissDetector.java