public static ArrayList<Prediction> toWekaPredictions(int y[],double p[]){
  ArrayList<Prediction> predictions=new ArrayList<Prediction>();
  for (int i=0; i < y.length; i++) {
    predictions.add(new NominalPrediction((double)y[i],new double[]{1. - p[i],p[i]}));
  }
  return predictions;
}

public static ArrayList < Prediction > toWekaPredictions ( int y [ ] , double p [ ] ) { ArrayList < Prediction > predictions = new ArrayList < Prediction > ( ) ; for ( int i = 0 ; i < y . length ; i ++ ) { predictions . add ( new NominalPrediction ( ( double ) y [ i ] , new double [ ] { 1. - p [ i ] , p [ i ] } ) ) ; } return predictions ; }
convert to weka ( multi - target ) predictions . note : currently only multi - label .
