question: 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 ; }
target:  Convert to Weka (multi-target) Predictions.  Note: currently only multi-label.