events.add(docToEvent(ir, i, c));
}
DataIndexer di = null;
di = new TwoPassDataIndexer(new EventCollectorAsStream(new SimpleEventCollector(events)), 3);
GISModel gm = GIS.trainModel(100, di);
Map<String,Double> byProb = new HashMap<String,Double>();
Map<String,String> res = new HashMap<String,String>();
int mp = 0;
int mn = 0;
for(int i=numDocs/2;i<numDocs;i++) {
Event e = docToEvent(ir, i, c);
//System.out.println(gm.getBestOutcome(gm.eval(e.getContext())));
double prob = gm.eval(e.getContext())[gm.getIndex("TRUE")];
//System.out.println(ir.document(i).getField("filename").stringValue().replaceAll("markedup", "source"));
String name = ir.document(i).getField("filename").stringValue().replaceAll("markedup", "source");
byProb.put(name, prob);
res.put(name, e.getOutcome());
if(e.getOutcome().equals("TRUE")) {