code: private Metric predictAnomalies() {
          Metric predictions = new Metric(getResultScopeName(), getResultMetricName());
          Map<Long, Double> predictionDatapoints = new HashMap<>();
  
          double[][] noiseMatrix = rpca.getE().getData();
          double[] noiseVector = matrixToVector(noiseMatrix);
  
          for (int i = 0; i < noiseVector.length; i++) {
              Long timestamp = timestamps[i];
              double noiseValue = noiseVector[i];
              double anomalyScore = calculateAnomalyScore(noiseValue);
              predictionDatapoints.put(timestamp, anomalyScore);
          }
  
          predictions.setDatapoints(predictionDatapoints);
          return predictions;
      }
docs: /*
  Assigns an anomaly score to each data point, indicating how likely it is
  to be an anomaly relative to other points and seasonality factors.