Code example for Multiset

Methods: add

   * Increments the entry specified by actual and predicted by count. 
  public void add(T actual, T predicted, int count) {
    if (matrix.containsKey(actual)) {
      matrix.get(actual).add(predicted, count);
    } else { 
      Multiset<T> counts = HashMultiset.create();
      counts.add(predicted, count);
      matrix.put(actual, counts);
   * Adds the entries from another confusion matrix to this one. 
  public void add(ConfusionMatrix<T> other) {
Connect your IDE to all the code out there  Get Codota for Java