public void testRF(String outputPrefix, int noTrees) throws FileNotFoundException {
        if (noTrees == 0) {
            noTrees = Integer.MAX_VALUE;
        }
        double sumacc = 0.0;
        double acc = 0.0;
        for (int i = 0; i < noFold; i++) {
            System.out.println("################ Fold no " + i);
            Set<Integer> trainingSet = new HashSet<Integer>(sampleIndex);
            trainingSet.removeAll(foldList.get(i));
            Set<Integer> testSet = foldList.get(i);
            
            // create the forest
            OptimalForest forest = new OptimalForest(storeFile, trainingSet, ppiGraph, noTrees);

            // test using the forest created            
            String outputFile = outputPrefix + Integer.toString(i);
            PrintStream out = new PrintStream(new FileOutputStream(outputFile));

            acc = 0.0;
            for (Integer s : testSet) {
                ArrayList<String> sample = sampleInfoStore.get(s);
                List<String> features = sample.subList(1, sample.size());
                Integer classLabel = 0;
                if (storeFile[s][0]) {
                    classLabel = 1;
                }
                double prediction = forest.classify(features);
                out.println(classLabel + " " + prediction);
                if (classLabel == 1 && prediction >= 0.5
                        || classLabel == 0 && prediction < 0.5) {
                    acc += 1;
                }
            }
            acc /= testSet.size();
            sumacc += acc;
            out.close();
        }
        sumacc /= noFold;
        System.err.println("RF NoTrees: " + noTrees + " Accuracy: " + sumacc);
    }