Changeset 2130 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe
- Timestamp:
- 08/24/16 10:06:39 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrie.java
r1853 r2130 83 83 84 84 Map<ITask, Counter> instanceCountMap = new HashMap<ITask, Counter>(); 85 86 85 Console.traceln(Level.FINEST, "preparing training"); 87 86 int noOfTaskInstances = 0; … … 106 105 107 106 Counter processedTaskInstances = new Counter(); 108 int counterRecheckAt = noOfTaskInstances / 10; // recheck the maximum count after each 107 Counter currentSequenceMaxCount = new Counter(); 108 int counterRecheckAt = noOfTaskInstances / 20; // recheck the maximum count after each 109 109 // 10% of processed task instances 110 110 for (IUserSession session : userSessions) { 111 train(session, maxOrder, instanceCountMap, processedTaskInstances, counterRecheckAt); 111 train(session, maxOrder, instanceCountMap, processedTaskInstances, 112 currentSequenceMaxCount, counterRecheckAt); 112 113 } 113 114 … … 148 149 Map<ITask, Counter> taskInstanceCountMap, 149 150 Counter processedTaskInstances, 151 Counter currentSequenceMaxCount, 150 152 int counterRecheckAt) 151 153 { 152 154 List<ITask> subsequence = new LinkedList<ITask>(); 153 155 154 int sequenceMaxCount = 0;155 156 156 for (ITaskInstance currentTaskInstance : userSession) { 157 157 … … 159 159 160 160 if (processedTaskInstances.count >= counterRecheckAt) { 161 sequenceMaxCount = getCurrentSequenceMaxCount();161 currentSequenceMaxCount.count = getCurrentSequenceMaxCount(); 162 162 processedTaskInstances.count = 0; 163 163 } 164 164 165 if (occurrenceCount < sequenceMaxCount) {165 if (occurrenceCount < currentSequenceMaxCount.count) { 166 166 // this task instance does not need to be considered, as it occurs not often enough 167 167 // to be part of a sequence, that occurs most often. Therefore train all remaining
Note: See TracChangeset
for help on using the changeset viewer.