private static void assignTargetAttribute(Instances instances) {
		boolean isInteger = true;
		for (Instance instance : instances) {
			if (!MathUtils.isInteger(instance.getTarget())) {
				isInteger = false;
				break;
			}
		}
		if (isInteger) {
			TreeSet<Integer> set = new TreeSet<>();
			for (Instance instance : instances) {
				double target = instance.getTarget();
				set.add((int) target);
			}
			String[] states = new String[set.size()];
			int i = 0;
			for (Integer v : set) {
				states[i++] = v.toString();
			}
			instances.setTargetAttribute(new NominalAttribute("target", states));
		} else {
			instances.setTargetAttribute(new NumericalAttribute("target"));
		}
	}