public static double p(double Y[][],int j,int k){
  int N=Y.length;
  double p=0.0001;
  for (int i=0; i < N; i++) {
    if ((int)Math.round(Y[i][j]) == k) {
      p+=1.0;
    }
  }
  return p / N;
}

public static double p ( double Y [ ] [ ] , int j , int k ) { int N = Y . length ; double p = 0.0001 ; for ( int i = 0 ; i < N ; i ++ ) { if ( ( int ) Math . round ( Y [ i ] [ j ] ) == k ) { p += 1.0 ; } } return p / N ; }
p - empirical prior . in the multi - label case , k in { 0 , 1 }
