averageScores = new HashMap<String,Double>();
maxScores = new HashMap<String,Double>();
for(String surf : scoresForEntity.keySet()) {
DescriptiveStatistics descStats = new DescriptiveStatisticsImpl();
for(double score : scoresForEntity.get(surf)) {
descStats.addValue(score);
}
maxScores.put(surf, descStats.getMax());
averageScores.put(surf, descStats.getMean());
}