Ignore:
Timestamp:
06/03/16 15:55:22 (8 years ago)
Author:
sherbold
Message:
  • result storage now considers first classifier in file when checking if a result is available
File:
1 edited

Legend:

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

    r98 r121  
    3636import de.ugoe.cs.cpdp.training.ITrainer; 
    3737import de.ugoe.cs.cpdp.training.ITrainingStrategy; 
     38import de.ugoe.cs.cpdp.training.IWekaCompatibleTrainer; 
    3839import de.ugoe.cs.cpdp.versions.IVersionFilter; 
    3940import de.ugoe.cs.cpdp.versions.SoftwareVersion; 
     
    350351            return 0; 
    351352        } 
     353         
     354        List<ITrainer> allTrainers = new LinkedList<>(); 
     355        for (ISetWiseTrainingStrategy setwiseTrainer : config.getSetWiseTrainers()) { 
     356            allTrainers.add(setwiseTrainer); 
     357        } 
     358        for (ISetWiseTestdataAwareTrainingStrategy setwiseTestdataAwareTrainer : config 
     359            .getSetWiseTestdataAwareTrainers()) 
     360        { 
     361            allTrainers.add(setwiseTestdataAwareTrainer); 
     362        } 
     363        for (ITrainingStrategy trainer : config.getTrainers()) { 
     364            allTrainers.add(trainer); 
     365        } 
     366        for (ITestAwareTrainingStrategy trainer : config.getTestAwareTrainers()) { 
     367            allTrainers.add(trainer); 
     368        } 
     369         
    352370        int available = Integer.MAX_VALUE; 
    353371        for (IResultStorage storage : config.getResultStorages()) { 
    354             int curAvailable = storage.containsResult(config.getExperimentName(), version.getVersion()); 
     372            String classifierName = ((IWekaCompatibleTrainer) allTrainers.get(0)).getName(); 
     373            int curAvailable = storage.containsResult(config.getExperimentName(), version.getVersion(), classifierName); 
    355374            if( curAvailable<available ) { 
    356375                available = curAvailable; 
Note: See TracChangeset for help on using the changeset viewer.