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 ++ ] ; EventStream es = new FileEventStream ( eventFile ) ; int iterations = 100 ; int cutoff = 5 ; if ( ai < args . length ) { iterations = Integer . parseInt ( args [ ai ++ ] ) ; cutoff = Integer . parseInt ( args [ ai ++ ] ) ; } GISModel model = GIS . trainModel ( es , iterations , cutoff ) ; 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 .