Ignore:
Timestamp:
04/29/16 14:29:52 (9 years ago)
Author:
sherbold
Message:
  • added new interface ITestAwareTraining strategy to the framework to support trainers with knowledge of the test data. The implementation of such trainers must take care to not accidentally take the classification of the test data into account.
File:
1 edited

Legend:

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

    r44 r65  
    3333import de.ugoe.cs.cpdp.training.ISetWiseTestdataAwareTrainingStrategy; 
    3434import de.ugoe.cs.cpdp.training.ISetWiseTrainingStrategy; 
     35import de.ugoe.cs.cpdp.training.ITestAwareTrainingStrategy; 
    3536import de.ugoe.cs.cpdp.training.ITrainer; 
    3637import de.ugoe.cs.cpdp.training.ITrainingStrategy; 
     
    206207                    trainer.apply(traindata); 
    207208                } 
     209                for (ITestAwareTrainingStrategy trainer : config.getTestAwareTrainers()) { 
     210                    Console.traceln(Level.FINE, String 
     211                        .format("[%s] [%02d/%02d] %s: applying trainer %s", 
     212                                config.getExperimentName(), versionCount, testVersionCount, 
     213                                testVersion.getVersion(), trainer.getName())); 
     214                    trainer.apply(testdata, traindata); 
     215                } 
    208216                File resultsDir = new File(config.getResultsPath()); 
    209217                if (!resultsDir.exists()) { 
     
    223231                    } 
    224232                    for (ITrainingStrategy trainer : config.getTrainers()) { 
     233                        allTrainers.add(trainer); 
     234                    } 
     235                    for (ITestAwareTrainingStrategy trainer : config.getTestAwareTrainers()) { 
    225236                        allTrainers.add(trainer); 
    226237                    } 
Note: See TracChangeset for help on using the changeset viewer.