private svm_problem readProblem(InputStreamReader isr) throws MaltChainedException {
		final svm_problem problem = new svm_problem();
		final svm_parameter param = getLibSvmParameters();
		final FeatureList featureList = new FeatureList();
		try {
			final BufferedReader fp = new BufferedReader(isr);
			
			problem.l = getNumberOfInstances();
			problem.x = new svm_node[problem.l][];
			problem.y = new double[problem.l];
			int i = 0;
			
			while(true) {
				String line = fp.readLine();
				if(line == null) break;
				int y = binariesInstance(line, featureList);
				if (y == -1) {
					continue;
				}
				try {
					problem.y[i] = y;
					problem.x[i] = new svm_node[featureList.size()];
					int p = 0;
			        for (int k=0; k < featureList.size(); k++) {
			        	MaltFeatureNode x = featureList.get(k);
						problem.x[i][p] = new svm_node();
						problem.x[i][p].value = x.getValue();
						problem.x[i][p].index = x.getIndex();          
						p++;
					}
					i++;
				} catch (ArrayIndexOutOfBoundsException e) {
					throw new LibException("Couldn't read libsvm problem from the instance file. ", e);
				}
			}
			fp.close();	
			if (param.gamma == 0) {
				param.gamma = 1.0/featureMap.getFeatureCounter();
			}
		} catch (IOException e) {
			throw new LibException("Couldn't read libsvm problem from the instance file. ", e);
		}
		return problem;
	}