@Override
	public void train(List<Instance> instances) {
		// check if the instance is classfier instance
		
		for (Instance instance : instances) {
			String label = instance.getLabel().toString();
			if (counter.containsKey(label)) {
				counter.put(label, counter.get(label)+1);
			}
			else {
				counter.put(label, 1);
			}
		}
		max = 0;
		for (String key : counter.keySet()) {
			if (counter.get(key) > max) {
				max = counter.get(key);
				majority = new ClassificationLabel(Integer.valueOf(key));
			}
		}
	}