private List<Instance> generateDataSet(String filePath) {
		//
		// 1. read the data according to the file path
		//
		List<String> records = IOUtils.linesFromFile(filePath);

		//
		// 2. transform the data to a list of Instance
		//
		
		// convert records to instances
		// assume that the last index is the label
		List<Instance> instances = new ArrayList<Instance>();
		for (String record : records) {
			String[] elements = record.split(",");
			int length = elements.length;
			double label = Double.parseDouble(elements[0]);
			double[] feature = new double[length];
			feature[0] = 1.0;
			for (int index = 1; index < length ; index++) {
				feature[index] = Double.parseDouble(elements[index]);
			}
			
			Instance instance = new Instance(feature, label);
			instances.add(instance);
		}
		
		return instances;
	}