Changeset 44 for trunk/CrossPare
- Timestamp:
- 11/17/15 20:42:08 (9 years ago)
- Location:
- trunk/CrossPare
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/.classpath
r36 r44 15 15 <classpathentry kind="lib" path="lib/org.eclipse.ocl.common_1.1.0.v20130531-0544.jar"/> 16 16 <classpathentry kind="lib" path="lib/org.eclipse.ocl.ecore_3.3.0.v20130520-1222.jar"/> 17 <classpathentry kind="lib" path="lib/commons-math3-3.5.jar"/> 17 18 <classpathentry kind="output" path="bin"/> 18 19 </classpath> -
trunk/CrossPare/build.xml
r2 r44 17 17 <pathelement location="lib/commons-collections4-4.0-alpha1.jar" /> 18 18 <pathelement location="lib/commons-io-2.4.jar" /> 19 <pathelement location="lib/commons-math3-3. 1.jar" />19 <pathelement location="lib/commons-math3-3.5.jar" /> 20 20 <pathelement location="lib/java-utils-0.0.1.jar" /> 21 21 <pathelement location="lib/weka.jar" /> -
trunk/CrossPare/experimentconfig.xsd
r32 r44 9 9 <xs:sequence minOccurs="1" maxOccurs="1"> 10 10 <xs:element name="partialconfig" type="pathType" minOccurs="0" maxOccurs="unbounded"/> 11 <xs:element name="loader" type="datapathType" minOccurs="0" maxOccurs=" 1"/>11 <xs:element name="loader" type="datapathType" minOccurs="0" maxOccurs="unbounded"/> 12 12 <xs:element name="executionStrategy" type="xs:string" minOccurs="0" maxOccurs="1"/> 13 13 <xs:element name="saveClassifier" type="xs:string" minOccurs="0" maxOccurs="1" /> … … 20 20 <xs:element name="setwisepostprocessor" type="setupType" minOccurs="0" maxOccurs="unbounded"/> 21 21 <xs:element name="setwisetrainer" type="setupType" minOccurs="0" maxOccurs="unbounded"/> 22 <xs:element name="setwisetestdataawaretrainer" type="setupType" minOccurs="0" maxOccurs="unbounded"/> 22 23 <xs:element name="preprocessor" type="setupType" minOccurs="0" maxOccurs="unbounded"/> 23 24 <xs:element name="pointwiseselector" type="setupType" minOccurs="0" maxOccurs="unbounded"/> -
trunk/CrossPare/src/de/ugoe/cs/cpdp/ExperimentConfiguration.java
r41 r44 1 // Copyright 2015 Georg-August-Universit ät Göttingen, Germany1 // Copyright 2015 Georg-August-Universit�t G�ttingen, Germany 2 2 // 3 3 // Licensed under the Apache License, Version 2.0 (the "License"); … … 40 40 import de.ugoe.cs.cpdp.eval.IEvaluationStrategy; 41 41 import de.ugoe.cs.cpdp.loader.IVersionLoader; 42 import de.ugoe.cs.cpdp.training.ISetWiseTestdataAwareTrainingStrategy; 42 43 import de.ugoe.cs.cpdp.training.ISetWiseTrainingStrategy; 43 44 import de.ugoe.cs.cpdp.training.ITrainingStrategy; … … 114 115 115 116 /** 117 * setwise testdata aware trainers, i.e., trainers that require the selected training data to be separate from 118 * each other and the current testdata 119 */ 120 private List<ISetWiseTestdataAwareTrainingStrategy> setwiseTestdataAwareTrainers; 121 122 /** 116 123 * data processors that are applied before the pointwise data selection 117 124 */ … … 178 185 setwisepostprocessors = new LinkedList<>(); 179 186 setwiseTrainers = new LinkedList<>(); 187 setwiseTestdataAwareTrainers = new LinkedList<>(); 180 188 preprocessors = new LinkedList<>(); 181 189 pointwiseselectors = new LinkedList<>(); … … 324 332 } 325 333 334 /** 335 * returns the setwise training algorithms 336 * 337 * @return setwise training algorithms 338 */ 339 public List<ISetWiseTestdataAwareTrainingStrategy> getSetWiseTestdataAwareTrainers() { 340 return setwiseTestdataAwareTrainers; 341 } 342 326 343 /** 327 344 * returns the processors applied before the pointwise data selection … … 465 482 trainer.setParameter(attributes.getValue("param")); 466 483 setwiseTrainers.add(trainer); 484 } 485 else if (qName.equals("setwisetestdataawaretrainer")) { 486 final ISetWiseTestdataAwareTrainingStrategy trainer = 487 (ISetWiseTestdataAwareTrainingStrategy) Class.forName("de.ugoe.cs.cpdp.training." + 488 attributes.getValue("name")) 489 .newInstance(); 490 trainer.setParameter(attributes.getValue("param")); 491 setwiseTestdataAwareTrainers.add(trainer); 467 492 } 468 493 else if (qName.equals("preprocessor")) { … … 566 591 setwisepostprocessors.addAll(other.setwisepostprocessors); 567 592 setwiseTrainers.addAll(other.setwiseTrainers); 593 setwiseTestdataAwareTrainers.addAll(other.setwiseTestdataAwareTrainers); 568 594 preprocessors.addAll(other.preprocessors); 569 595 pointwiseselectors.addAll(other.pointwiseselectors); … … 609 635 StringTools.ENDLINE); 610 636 builder.append("Setwise trainers: " + setwiseTrainers.toString() + StringTools.ENDLINE); 637 builder.append("Setwise Testdata Aware trainers: " + setwiseTestdataAwareTrainers.toString() + StringTools.ENDLINE); 611 638 builder 612 639 .append("Pointwise preprocessors: " + preprocessors.toString() + StringTools.ENDLINE); -
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/AbstractWekaEvaluation.java
r41 r44 123 123 output.append(",tn_" + ((IWekaCompatibleTrainer) trainer).getName()); 124 124 output.append(",fp_" + ((IWekaCompatibleTrainer) trainer).getName()); 125 output.append(",trainerror_" + ((IWekaCompatibleTrainer) trainer).getName());126 output.append(",trainrecall_" + ((IWekaCompatibleTrainer) trainer).getName());127 output.append(",trainprecision_" + ((IWekaCompatibleTrainer) trainer).getName());128 output.append(",trainsuccHe_" + ((IWekaCompatibleTrainer) trainer).getName());125 //output.append(",trainerror_" + ((IWekaCompatibleTrainer) trainer).getName()); 126 //output.append(",trainrecall_" + ((IWekaCompatibleTrainer) trainer).getName()); 127 //output.append(",trainprecision_" + ((IWekaCompatibleTrainer) trainer).getName()); 128 //output.append(",trainsuccHe_" + ((IWekaCompatibleTrainer) trainer).getName()); 129 129 } 130 130 output.append(StringTools.ENDLINE); … … 136 136 137 137 Evaluation eval = null; 138 Evaluation evalTrain = null;138 //Evaluation evalTrain = null; 139 139 for (Classifier classifier : classifiers) { 140 140 eval = createEvaluator(testdata, classifier); 141 evalTrain = createEvaluator(traindata, classifier);141 //evalTrain = createEvaluator(traindata, classifier); 142 142 143 143 double pf = … … 195 195 output.append("," + eval.numTrueNegatives(1)); 196 196 output.append("," + eval.numFalsePositives(1)); 197 output.append("," + evalTrain.errorRate());197 /*output.append("," + evalTrain.errorRate()); 198 198 output.append("," + evalTrain.recall(1)); 199 199 output.append("," + evalTrain.precision(1)); … … 203 203 else { 204 204 output.append(",0"); 205 } 205 }*/ 206 206 } 207 207 -
trunk/CrossPare/src/de/ugoe/cs/cpdp/execution/CrossProjectExperiment.java
r41 r44 31 31 import de.ugoe.cs.cpdp.eval.IEvaluationStrategy; 32 32 import de.ugoe.cs.cpdp.loader.IVersionLoader; 33 import de.ugoe.cs.cpdp.training.ISetWiseTestdataAwareTrainingStrategy; 33 34 import de.ugoe.cs.cpdp.training.ISetWiseTrainingStrategy; 34 35 import de.ugoe.cs.cpdp.training.ITrainer; … … 168 169 setwiseTrainer.apply(traindataSet); 169 170 } 171 for (ISetWiseTestdataAwareTrainingStrategy setwiseTestdataAwareTrainer : config.getSetWiseTestdataAwareTrainers()) { 172 Console.traceln(Level.FINE, String 173 .format("[%s] [%02d/%02d] %s: applying testdata aware setwise trainer %s", 174 config.getExperimentName(), versionCount, testVersionCount, 175 testVersion.getVersion(), setwiseTestdataAwareTrainer.getName())); 176 setwiseTestdataAwareTrainer.apply(traindataSet, testdata); 177 } 170 178 Instances traindata = makeSingleTrainingSet(traindataSet); 171 179 for (IProcessesingStrategy processor : config.getPreProcessors()) { … … 210 218 for (ISetWiseTrainingStrategy setwiseTrainer : config.getSetWiseTrainers()) { 211 219 allTrainers.add(setwiseTrainer); 220 } 221 for (ISetWiseTestdataAwareTrainingStrategy setwiseTestdataAwareTrainer : config.getSetWiseTestdataAwareTrainers()) { 222 allTrainers.add(setwiseTestdataAwareTrainer); 212 223 } 213 224 for (ITrainingStrategy trainer : config.getTrainers()) { -
trunk/CrossPare/src/de/ugoe/cs/cpdp/execution/RelaxedCrossProjectExperiment.java
r41 r44 31 31 import de.ugoe.cs.cpdp.eval.IEvaluationStrategy; 32 32 import de.ugoe.cs.cpdp.loader.IVersionLoader; 33 import de.ugoe.cs.cpdp.training.ISetWiseTestdataAwareTrainingStrategy; 33 34 import de.ugoe.cs.cpdp.training.ISetWiseTrainingStrategy; 34 35 import de.ugoe.cs.cpdp.training.ITrainer; … … 173 174 setwiseTrainer.apply(traindataSet); 174 175 } 176 for (ISetWiseTestdataAwareTrainingStrategy setwiseTestdataAwareTrainer : config.getSetWiseTestdataAwareTrainers()) { 177 Console.traceln(Level.FINE, String 178 .format("[%s] [%02d/%02d] %s: applying testdata aware setwise trainer %s", 179 config.getExperimentName(), versionCount, testVersionCount, 180 testVersion.getVersion(), setwiseTestdataAwareTrainer.getName())); 181 setwiseTestdataAwareTrainer.apply(traindataSet, testdata); 182 } 175 183 Instances traindata = makeSingleTrainingSet(traindataSet); 176 184 for (IProcessesingStrategy processor : config.getPreProcessors()) {
Note: See TracChangeset
for help on using the changeset viewer.