public List<Instance> readData() {
		ArrayList<Instance> instances = new ArrayList<Instance>();
		
		while (this._scanner.hasNextLine()) {
			String line = this._scanner.nextLine();
			if (line.trim().length() == 0)
				   continue;
			
			FeatureVector feature_vector = new FeatureVector();
		
			// Divide the line into features and label.
			String[] split_line = line.split(" ");

			String label_string = split_line[0];
			Label label = null;
			if (this._classification) {
				int int_label = Integer.parseInt(label_string);
				if (int_label != -1) {
					label = new ClassificationLabel(int_label);
				}
			} else {
			}
			for (int ii = 1; ii < split_line.length; ii++) {
				String item = split_line[ii];
				String name = item.split(":")[0];
				int index = Integer.parseInt(name);
				double value = Double.parseDouble(item.split(":")[1]);
				
				if (value != 0)
					feature_vector.add(index, value);
			}
			
			Instance instance = new Instance(feature_vector, label);
			instances.add(instance);
		}		
		
		return instances;
	}