Changeset 2130


Ignore:
Timestamp:
08/24/16 10:06:39 (8 years ago)
Author:
pharms
Message:
  • improved partial trie training to make it even more partial by not training instances of tasks that occur less often then the currently detected sequence also in other sessions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrie.java

    r1853 r2130  
    8383         
    8484        Map<ITask, Counter> instanceCountMap = new HashMap<ITask, Counter>(); 
    85          
    8685        Console.traceln(Level.FINEST, "preparing training"); 
    8786        int noOfTaskInstances = 0; 
     
    106105         
    107106        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 
    109109                                                       // 10% of processed task instances 
    110110        for (IUserSession session : userSessions) { 
    111             train(session, maxOrder, instanceCountMap, processedTaskInstances, counterRecheckAt); 
     111            train(session, maxOrder, instanceCountMap, processedTaskInstances, 
     112                  currentSequenceMaxCount, counterRecheckAt); 
    112113        }       
    113114         
     
    148149                       Map<ITask, Counter> taskInstanceCountMap, 
    149150                       Counter             processedTaskInstances, 
     151                       Counter             currentSequenceMaxCount, 
    150152                       int                 counterRecheckAt) 
    151153    { 
    152154        List<ITask> subsequence = new LinkedList<ITask>(); 
    153155         
    154         int sequenceMaxCount = 0; 
    155          
    156156        for (ITaskInstance currentTaskInstance : userSession) { 
    157157             
     
    159159             
    160160            if (processedTaskInstances.count >= counterRecheckAt) { 
    161                 sequenceMaxCount = getCurrentSequenceMaxCount(); 
     161                currentSequenceMaxCount.count = getCurrentSequenceMaxCount(); 
    162162                processedTaskInstances.count = 0; 
    163163            } 
    164164             
    165             if (occurrenceCount < sequenceMaxCount) { 
     165            if (occurrenceCount < currentSequenceMaxCount.count) { 
    166166                // this task instance does not need to be considered, as it occurs not often enough 
    167167                // to be part of a sequence, that occurs most often. Therefore train all remaining 
Note: See TracChangeset for help on using the changeset viewer.