code: public SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, Integer numClasses) {
          validateInteger("confusionMatrix", "labels", labels);
          validateInteger("confusionMatrix", "prediction", pred);
          SDVariable result = f().confusionMatrix(labels, pred, numClasses);
          return updateVariableNameAndReference(result, name);
      }
docs: Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
  which are represented as integer values.<br>
  For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is:<br>
  [1, 0, 0, 0]<br>
  [0, 1, 1, 0]<br>
  [0, 0, 0, 0]<br>
  [0, 0, 0, 0]<br>
  
  @param name       Name of the output variable
  @param labels     Labels - 1D array of integer values representing label values
  @param pred       Predictions - 1D array of integer values representing predictions. Same length as labels
  @param numClasses Number of classes
  @return Output variable (2D, shape [numClasses, numClasses})