private void loadDataFromFile(String file, InstanceType type) throws IOException 
	{
		FileReader fr = new FileReader(file);
		BufferedReader br = new BufferedReader(fr);
		ArrayList<Double> features = new ArrayList<Double>();
		String line = null;
		while((line = br.readLine()) != null)
		{
			String[] tks = line.trim().split("[\t]+");
			int id = Integer.parseInt(tks[0]);
			double target = Double.parseDouble(tks[1]);
			features.clear();
			for(int i = 2; i < tks.length; i++)
			{
				double value = Double.parseDouble(tks[i].split(":")[1]);
				features.add(value);
			}
			if(features.size() > this.featureCount)
				featureCount = features.size();
			DenseInstance inst = new DenseInstance(id, target);
			inst.type = type;
			inst.addFeature(features);
			this.addInstance(inst);
		}
		br.close();
		fr.close();
	}