Integer run, Integer fold) throws IOException {
Instances inst = initializeInstances(sparseData, sortedMap, train,
label, run, fold);
String filename = FileUtil.getDataFilePrefix(outdir, label, run,
fold, train) + ".arff";
ArffSaver saver = new ArffSaver();
saver.setDestination(new File(filename));
saver.setFile(new File(filename));
saver.setInstances(inst);
saver.writeBatch();
}