public double err() {
    if(tooLarge())throw new UnsupportedOperationException("error cannot be computed: too many classes");
    double n = total_rows();
    double err = n;
    for( int d = 0; d < _cm.length; ++d )
      err -= _cm[d][d];
    return err / n;
  }
public double err ( ) { if ( tooLarge ( ) ) throw new UnsupportedOperationException ( "error cannot be computed: too many classes" ) ; double n = total_rows ( ) ; double err = n ; for ( int d = 0 ; d < _cm . length ; ++ d ) err -= _cm [ d ] [ d ] ; return err / n ; }
@return overall classification error