- Timestamp:
- 07/18/16 12:26:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/execution/CrossValidationExperiment.java
r132 r135 138 138 } 139 139 } 140 140 141 141 numTrainers += config.getSetWiseTrainers().size(); 142 142 numTrainers += config.getSetWiseTestdataAwareTrainers().size(); … … 154 154 testVersionCount, testVersion.getVersion())); 155 155 int numResultsAvailable = resultsAvailable(testVersion); 156 if (numResultsAvailable >= numTrainers *config.getRepetitions()) {156 if (numResultsAvailable >= numTrainers * config.getRepetitions()) { 157 157 Console.traceln(Level.INFO, 158 158 String.format( … … 167 167 Instances testdata = testVersion.getInstances(); 168 168 List<Double> efforts = testVersion.getEfforts(); 169 169 170 170 for (ITrainingStrategy trainer : config.getTrainers()) { 171 171 Console.traceln(Level.FINE, … … 176 176 trainer.apply(testdata); 177 177 } 178 178 179 179 File resultsDir = new File(config.getResultsPath()); 180 180 if (!resultsDir.exists()) { … … 236 236 } 237 237 238 /** 239 * <p> 240 * helper function that checks if the results are already in the data store 241 * </p> 242 * 243 * @param version 244 * version for which the results are checked 245 * @return 246 */ 238 247 private int resultsAvailable(SoftwareVersion version) { 239 248 if (config.getResultStorages().isEmpty()) { 240 249 return 0; 241 250 } 242 251 243 252 List<ITrainer> allTrainers = new LinkedList<>(); 244 253 for (ISetWiseTrainingStrategy setwiseTrainer : config.getSetWiseTrainers()) { … … 256 265 allTrainers.add(trainer); 257 266 } 258 267 259 268 int available = Integer.MAX_VALUE; 260 269 for (IResultStorage storage : config.getResultStorages()) { 261 270 String classifierName = ((IWekaCompatibleTrainer) allTrainers.get(0)).getName(); 262 int curAvailable = storage.containsResult(config.getExperimentName(), version.getVersion(), classifierName); 263 if( curAvailable<available ) { 271 int curAvailable = storage.containsResult(config.getExperimentName(), 272 version.getVersion(), classifierName); 273 if (curAvailable < available) { 264 274 available = curAvailable; 265 275 }
Note: See TracChangeset
for help on using the changeset viewer.