Changeset 121 for trunk/CrossPare/src/de/ugoe/cs
- Timestamp:
- 06/03/16 15:55:22 (9 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/IResultStorage.java
r98 r121 43 43 * @param productName 44 44 * name of the product 45 * @param classifierName 46 * name of the first classifier in the configuration 45 47 * @return number of contained resultsfor the given product and experiment 46 48 */ 47 public int containsResult(String experimentName, String productName );49 public int containsResult(String experimentName, String productName, String classifierName); 48 50 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/MySQLResultStorage.java
r98 r121 162 162 */ 163 163 @Override 164 public int containsResult(String experimentName, String productName ) {164 public int containsResult(String experimentName, String productName, String classifierName) { 165 165 String sql = "SELECT COUNT(*) as cnt FROM crosspare.results WHERE configurationName=\'" + 166 experimentName + "\' AND productName=\'" + productName + "\' ;";166 experimentName + "\' AND productName=\'" + productName + "\' AND classifier=\'" + classifierName + "\';"; 167 167 Statement stmt; 168 168 try { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/execution/AbstractCrossProjectExperiment.java
r98 r121 36 36 import de.ugoe.cs.cpdp.training.ITrainer; 37 37 import de.ugoe.cs.cpdp.training.ITrainingStrategy; 38 import de.ugoe.cs.cpdp.training.IWekaCompatibleTrainer; 38 39 import de.ugoe.cs.cpdp.versions.IVersionFilter; 39 40 import de.ugoe.cs.cpdp.versions.SoftwareVersion; … … 350 351 return 0; 351 352 } 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 352 370 int available = Integer.MAX_VALUE; 353 371 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); 355 374 if( curAvailable<available ) { 356 375 available = curAvailable;
Note: See TracChangeset
for help on using the changeset viewer.