eventsToCompare = index(numEvents, fes, predicateIndex); } finally { fes.close();
eventsToCompare = index(numEvents, fes, predicateIndex); } finally { fes.close();
/** * Trains and writes a model based on the events in the specified event file. * the name of the model created is based on the event file name. * @param args eventfile [iterations cuttoff] * @throws IOException when the eventfile can not be read or the model file can not be written. */ public static void main(String[] args) throws IOException { if (args.length == 0) { System.err.println("Usage: FileEventStream eventfile [iterations cutoff]"); System.exit(1); } int ai=0; String eventFile = args[ai++]; int iterations = 100; int cutoff = 5; if (ai < args.length) { iterations = Integer.parseInt(args[ai++]); cutoff = Integer.parseInt(args[ai++]); } AbstractModel model; FileEventStream es = new FileEventStream(eventFile); try { model = GIS.trainModel(es,iterations,cutoff); } finally { es.close(); } new SuffixSensitiveGISModelWriter(model, new File(eventFile+".bin.gz")).persist(); } }
/** * Trains and writes a model based on the events in the specified event file. * the name of the model created is based on the event file name. * @param args eventfile [iterations cuttoff] * @throws IOException when the eventfile can not be read or the model file can not be written. */ public static void main(String[] args) throws IOException { if (args.length == 0) { System.err.println("Usage: FileEventStream eventfile [iterations cutoff]"); System.exit(1); } int ai=0; String eventFile = args[ai++]; int iterations = 100; int cutoff = 5; if (ai < args.length) { iterations = Integer.parseInt(args[ai++]); cutoff = Integer.parseInt(args[ai++]); } AbstractModel model; FileEventStream es = new FileEventStream(eventFile); try { model = GIS.trainModel(es,iterations,cutoff); } finally { es.close(); } new SuffixSensitiveGISModelWriter(model, new File(eventFile+".bin.gz")).persist(); } }