private static Instance parseDenseInstance(String[] data, int classIndex) {
		if (classIndex < 0) {
			double[] vector = new double[data.length];
			double classValue = Double.NaN;
			for (int i = 0; i < data.length; i++) {
				vector[i] = Double.parseDouble(data[i]);
			}
			return new Instance(vector, classValue);
		} else {
			double[] vector = new double[data.length - 1];
			double classValue = Double.NaN;
			for (int i = 0; i < data.length; i++) {
				double value = Double.parseDouble(data[i]);
				if (i < classIndex) {
					vector[i] = value;
				} else if (i > classIndex) {
					vector[i - 1] = value;
				} else {
					classValue = value;
				}
			}
			return new Instance(vector, classValue);
		}
	}