private int findOutliers(double[] value, double k) {
    Median median = new Median();
    double mid = median.evaluate(value);
    double sigma = Util.mad(value);
    int num = 0;
    for (double v : value) {
      if (Math.abs(v - mid) > k * sigma) {
        num++;
      }
    }
    return num;
  }
return number of points lie out of median +- k * MAD.
library-udf/src/main/java/org/apache/iotdb/library/dquality/util/TimeSeriesQuality.java