code: public AnomalyDetectionPrediction predictAnomalyDetection(RowData data) throws PredictException {
      double[] preds = preamble(ModelCategory.AnomalyDetection, data, 0.0);
  
      AnomalyDetectionPrediction p = new AnomalyDetectionPrediction();
      p.normalizedScore = preds[0];
      p.score = preds[1];
      if (enableLeafAssignment) { // only get leaf node assignment if enabled
        SharedTreeMojoModel.LeafNodeAssignments assignments = leafNodeAssignmentExtended(data);
        p.leafNodeAssignments = assignments._paths;
        p.leafNodeAssignmentIds = assignments._nodeIds;
      }
      if (enableStagedProbabilities) {
          double[] rawData = nanArray(m.nfeatures());
          rawData = fillRawData(data, rawData);
          p.stageProbabilities = ((SharedTreeMojoModel) m).scoreStagedPredictions(rawData, preds.length);
      }
      return p;
    }
docs: Make a prediction on a new data point using a Binomial model.
  
  @param data A new data point.
  @return The prediction.
  @throws PredictException