Ignore:
Timestamp:
05/13/16 09:18:15 (9 years ago)
Author:
sherbold
Message:
  • added the new configuration parameter repetitions and implemented its usage in the AbstractCrossProjectExperiment?. It now allows for multiple storages of the same result in an IResultContainer to allow for repetitions of experiments with random components.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/execution/AbstractCrossProjectExperiment.java

    r86 r98  
    148148        int versionCount = 1; 
    149149        int testVersionCount = 0; 
     150        int numTrainers = 0; 
    150151 
    151152        for (SoftwareVersion testVersion : versions) { 
     
    154155            } 
    155156        } 
     157         
     158        numTrainers += config.getSetWiseTrainers().size(); 
     159        numTrainers += config.getSetWiseTestdataAwareTrainers().size(); 
     160        numTrainers += config.getTrainers().size(); 
     161        numTrainers += config.getTestAwareTrainers().size(); 
    156162 
    157163        // sort versions 
     
    164170                                              config.getExperimentName(), versionCount, 
    165171                                              testVersionCount, testVersion.getVersion())); 
    166                 if (resultsAvailable(testVersion)) { 
     172                int numResultsAvailable = resultsAvailable(testVersion); 
     173                if (numResultsAvailable >= numTrainers*config.getRepetitions()) { 
    167174                    Console.traceln(Level.INFO, 
    168175                                    String.format( 
     
    339346    } 
    340347 
    341     private boolean resultsAvailable(SoftwareVersion version) { 
     348    private int resultsAvailable(SoftwareVersion version) { 
    342349        if (config.getResultStorages().isEmpty()) { 
    343             return false; 
    344         } 
    345         boolean available = true; 
     350            return 0; 
     351        } 
     352        int available = Integer.MAX_VALUE; 
    346353        for (IResultStorage storage : config.getResultStorages()) { 
    347             available &= storage.containsResult(config.getExperimentName(), version.getVersion()); 
     354            int curAvailable = storage.containsResult(config.getExperimentName(), version.getVersion()); 
     355            if( curAvailable<available ) { 
     356                available = curAvailable; 
     357            } 
    348358        } 
    349359        return available; 
Note: See TracChangeset for help on using the changeset viewer.