code: public List<Prediction> getPredictionsByActualClass(int actualClass) {
          if (confusionMatrixMetaData == null)
              return null;
  
          List<Prediction> out = new ArrayList<>();
          for (Map.Entry<Pair<Integer, Integer>, List<Object>> entry : confusionMatrixMetaData.entrySet()) { //Entry Pair: (Actual,Predicted)
              if (entry.getKey().getFirst() == actualClass) {
                  int actual = entry.getKey().getFirst();
                  int predicted = entry.getKey().getSecond();
                  for (Object m : entry.getValue()) {
                      out.add(new Prediction(actual, predicted, m));
                  }
              }
          }
          return out;
      }
docs: Get a list of predictions, for all data with the specified <i>actual</i> class, regardless of the predicted
  class.
  <p>
  <b>Note</b>: Prediction errors are ONLY available if the "evaluate with metadata"  method is used: {@link #eval(INDArray, INDArray, List)}
  Otherwise (if the metadata hasn't been recorded via that previously mentioned eval method), there is no value in
  splitting each prediction out into a separate Prediction object - instead, use the confusion matrix to get the counts,
  via {@link #getConfusionMatrix()}
  
  @param actualClass Actual class to get predictions for
  @return List of predictions, or null if the "evaluate with metadata" method was not used