// create a new ArrayList because subList() returns view and not serialzable
List<TrainingData.Rating> trainingRatings =
new ArrayList<TrainingData.Rating>(ratings.subList(0, trainingEndIndex));
List<TrainingData.Rating> testRatings = ratings.subList(trainingEndIndex, testEndIndex);
TrainingData td = new TrainingData(trainingRatings);
List<Tuple2<Query, Float>> qaList = prepareValidation(testRatings);
data.add(new Tuple3<Object, TrainingData, Iterable<Tuple2<Query, Float>>>(
null, td, qaList));
}