code: private void read_problem(File learningFile) throws IOException {
  		BufferedReader fp = new BufferedReader(new FileReader(learningFile));
  		Vector vy = new Vector();
  		Vector vx = new Vector();
  		int max_index = 0;
  		while (true) {
  			String line = fp.readLine();
  			if (line == null)
  				break;
  			StringTokenizer st = new StringTokenizer(line, " \t\n\r\f:");
  			vy.addElement(st.nextToken());
  			int m = st.countTokens() / 2;
  			svm_node[] x = new svm_node[m];
  			for (int j = 0; j < m; j++) {
  				x[j] = new svm_node();
  				x[j].index = Integer.parseInt(st.nextToken());
  				x[j].value = Double.parseDouble(st.nextToken());
  			}
  			if (m > 0)
  				max_index = Math.max(max_index, x[m - 1].index);
  			vx.addElement(x);
  		}
  		prob = new svm_problem();
  		prob.l=vy.size();
  		prob.y = new double[prob.l];
  		prob.x = new svm_node[prob.l][];
  		for (int i = 0; i < prob.l; i++)
  			prob.x[i]= (svm_node[]) vx.elementAt(i);
  		for (int i = 0; i < prob.l; i++) {
  			double labell = Double.parseDouble((String) vy.elementAt(i));
  			prob.y[i]= labell;
  		}
  		if (param.gamma == 0)
  			param.gamma = 1.0 / max_index;
  		fp.close();
  	}
docs: read in a problem (in svmlight format)