Changeset 116 for trunk/EventBenchConsole/src
- Timestamp:
- 07/12/11 16:29:12 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainMarkovModel.java
r84 r116 28 28 modelname = (String) parameters.get(0); 29 29 if( parameters.size()==2 ) { 30 order = Integer.parseInt((String) parameters.get( 0));30 order = Integer.parseInt((String) parameters.get(1)); 31 31 } 32 32 } catch (Exception e) { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainPPM.java
r84 r116 15 15 @Override 16 16 public void help() { 17 Console.println("Usage: trainPPM <modelName> < order>");17 Console.println("Usage: trainPPM <modelName> <probEscape> <maxOrder> {<minOrder>}"); 18 18 } 19 19 … … 22 22 public void run(List<Object> parameters) { 23 23 String modelname; 24 int order; 24 double probEscape; 25 int maxOrder; 26 int minOrder = 0; 25 27 try { 26 28 modelname = (String) parameters.get(0); 27 order = Integer.parseInt((String) parameters.get(1)); 29 probEscape = Double.parseDouble((String) parameters.get(1)); 30 maxOrder = Integer.parseInt((String) parameters.get(2)); 31 if( parameters.size()==4 ) { 32 minOrder = Integer.parseInt((String) parameters.get(3)); 33 } 28 34 } catch (Exception e) { 29 35 throw new InvalidParameterException(); … … 37 43 if( sequences.size()>0 ) { 38 44 if( sequences.get(0).get(0) instanceof Event ) { 39 PredictionByPartialMatch model = new PredictionByPartialMatch( order, new Random());45 PredictionByPartialMatch model = new PredictionByPartialMatch(maxOrder, minOrder, new Random(), probEscape); 40 46 model.train(sequences); 41 47 if( GlobalDataContainer.getInstance().addData(modelname, model) ) {
Note: See TracChangeset
for help on using the changeset viewer.