@Override
  public void beforeStart(UDFParameters parameters, UDTFConfigurations configurations)
      throws Exception {
    configurations
        .setAccessStrategy(
            new SlidingSizeWindowAccessStrategy(parameters.getIntOrDefault("window", 10000)))
        .setOutputDataType(Type.DOUBLE);
    this.multipleK = parameters.getIntOrDefault("k", 3);
    this.dim = parameters.getChildExpressionsSize();
    this.method = parameters.getStringOrDefault("method", DEFAULT_METHOD);
    this.window = parameters.getIntOrDefault("window", 5);
  }
This function is used to detect density anomaly of time series.
library-udf/src/main/java/org/apache/iotdb/library/anomaly/UDTFLOF.java