Ignore:
Timestamp:
10/15/11 01:41:55 (13 years ago)
Author:
sherbold
Message:
  • added methods getChildren() and setCount() to de.ugoe.cs.eventbench.models.TrieNode?
  • added method updateKnownSymbols() to de.ugoe.cs.eventbench.models.Trie
  • changed the visibility of some members of de.ugoe.cs.eventbench.models.PredictionByPartionMatch?
  • added class de.ugoe.cs.eventbench.models.ModelFlattener? to generate FirstOrderMarkovModel? from higher-order models through state splitting
  • tweaked entropy calculation of de.ugoe.cs.eventbench.models.FirstOrderMarkovModel? to work with flattened models (locating of START and END was a problem)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/Trie.java

    r251 r258  
    8585         */ 
    8686        public void train(List<T> sequence, int maxOrder) { 
    87                 if( maxOrder<1 ) { 
     87                if (maxOrder < 1) { 
    8888                        return; 
    8989                } 
     
    400400                return rootNode.getNumLeafs(); 
    401401        } 
     402 
     403        /** 
     404         * <p> 
     405         * Updates the list of known symbols by replacing it with all symbols that 
     406         * are found in the child nodes of the root node. This should be the same as 
     407         * all symbols that are contained in the trie. 
     408         * </p> 
     409         */ 
     410        public void updateKnownSymbols() { 
     411                knownSymbols = new HashSet<T>(); 
     412                for (TrieNode<T> node : rootNode.getChildren()) { 
     413                        knownSymbols.add(node.getSymbol()); 
     414                } 
     415        } 
    402416} 
Note: See TracChangeset for help on using the changeset viewer.