for (int i = 0; i < data.size(); i++) {
//in.putRow(i,data.get(i).getFirst());
inputData.assignRow( i, data.get(i).getFirst().viewRow(0) );
//out.putRow(i,data.get(i).getSecond());
outputLabels.assignRow( i, data.get(i).getSecond().viewRow(0) );
}
return new DataSet( inputData, outputLabels );