public static double P(Instances D,int j[],int v[]){
  int N=D.numInstances();
  int n=0;
  for (  Instance x : D) {
    if (match(x,j,v))     n++;
  }
  return Math.max(0.0001,(double)n / N);
}

public static double P ( Instances D , int j [ ] , int v [ ] ) { int N = D . numInstances ( ) ; int n = 0 ; for ( Instance x : D ) { if ( match ( x , j , v ) ) n ++ ; } return Math . max ( 0.0001 , ( double ) n / N ) ; }
p - empirical joint . multi - target friendly .
