Changeset 78
- Timestamp:
- 05/06/16 15:52:27 (8 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp/training
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/FixClass.java
r41 r78 16 16 17 17 import weka.classifiers.AbstractClassifier; 18 import weka.classifiers.Classifier;19 18 import weka.core.Capabilities; 20 19 import weka.core.Instance; … … 28 27 * @author Steffen Herbold 29 28 */ 30 public class FixClass extends AbstractClassifier implements ITrainingStrategy, 31 IWekaCompatibleTrainer 32 { 29 public class FixClass extends AbstractClassifier { 33 30 34 31 private static final long serialVersionUID = 1L; … … 79 76 // do nothing 80 77 } 81 82 @Override83 public void setParameter(String parameters) {84 try {85 this.setOptions(parameters.split(" "));86 }87 catch (Exception e) {88 e.printStackTrace();89 }90 }91 92 @Override93 public void apply(Instances traindata) {94 // do nothing!95 }96 97 @Override98 public String getName() {99 return "FixClass";100 }101 102 @Override103 public Classifier getClassifier() {104 return this;105 }106 107 78 } -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/RandomClass.java
r41 r78 18 18 19 19 import weka.classifiers.AbstractClassifier; 20 import weka.classifiers.Classifier;21 20 import weka.core.Instance; 22 21 import weka.core.Instances; … … 28 27 * values from the XML configuration. 29 28 */ 30 public class RandomClass extends AbstractClassifier implements ITrainingStrategy, 31 IWekaCompatibleTrainer 32 { 29 public class RandomClass extends AbstractClassifier { 33 30 34 31 private static final long serialVersionUID = 1L; … … 38 35 39 36 @Override 40 public void setParameter(String parameters) {41 // do nothing, maybe take percentages for distribution later42 }43 44 @Override45 37 public void buildClassifier(Instances arg0) throws Exception { 46 38 // do nothing 47 }48 49 @Override50 public Classifier getClassifier() {51 return this;52 }53 54 @Override55 public void apply(Instances traindata) {56 // nothing to do57 }58 59 @Override60 public String getName() {61 return "RandomClass";62 39 } 63 40
Note: See TracChangeset
for help on using the changeset viewer.