code: public int colSum(int classindex) {
      int s = 0;
      for(int i = 0; i < confusion.length; i++) {
        s += confusion[i][classindex];
      }
      return s;
    }
docs: The number of instances present in the specified column. I.e., the
  instances of class <code>classindex</code>.
  
  
  @param classindex the index of the class theresulting number of instances
  belongs to
  @return the number of instances present in the specified column