Changeset 10 for trunk/EventBenchConsole


Ignore:
Timestamp:
04/13/11 14:15:10 (14 years ago)
Author:
sherbold
Message:
  • changed signature of trainPPM to trainPPM <modelname> <order>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainPPM.java

    r8 r10  
    1515        @Override 
    1616        public void help() { 
    17                 Console.println("Usage: trainPPM <modelName>"); 
     17                Console.println("Usage: trainPPM <modelName> <order>"); 
    1818        } 
    1919 
     
    2222        public void run(List<Object> parameters) { 
    2323                String modelname; 
     24                int order; 
    2425                try { 
    2526                        modelname = (String) parameters.get(0); 
     27                        order = Integer.parseInt((String) parameters.get(1)); 
    2628                } catch (Exception e) { 
    2729                        throw new InvalidParameterException(); 
     
    3537                        if( sequences.size()>0 ) { 
    3638                                if( sequences.get(0).get(0) instanceof Event ) { 
    37                                         PredictionByPartialMatch model = new PredictionByPartialMatch(new Random()); 
     39                                        PredictionByPartialMatch model = new PredictionByPartialMatch(order, new Random()); 
    3840                                        model.train(sequences); 
    3941                                        if( GlobalDataContainer.getInstance().addData(modelname, model) ) { 
Note: See TracChangeset for help on using the changeset viewer.