private String plurality(List<Instance> examples) {
		Map<String, Integer> scores = new LinkedHashMap<String, Integer>();
		for (Instance instance : examples) {
			Integer score = scores.get(instance.label);
			if (score == null) {
				score = 0;
			}
			scores.put(instance.label, score + 1);
		}
		if(scores.isEmpty()) {
			return "1";
		} else if (scores.size() == 1) {
			return scores.keySet().iterator().next();
		} else {
			int winningScore = Integer.MIN_VALUE;
			String winner = null;
			for (String label : scores.keySet()) {
				if (!label.equals(winner)) {
					int score = scores.get(label);
					if (winningScore == score) {
						if (label.compareToIgnoreCase(winner) < 0) {
							winner = label;
						}
					} else if (winningScore < score) {
						winner = label;
						winningScore = score;
					}
				}
			}
			return winner;
		}
	}