- Timestamp:
- 07/18/16 12:26:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/wekaclassifier/RandomClass.java
r86 r135 22 22 23 23 /** 24 * <p> 24 25 * Assigns a random class label to the instance it is evaluated on. 25 * 26 * </p> 26 27 * The range of class labels are hardcoded in fixedClassValues. This can later be extended to take 27 28 * values from the XML configuration. 29 * </p> 30 * 31 * @author Alexander Trautsch 28 32 */ 29 33 public class RandomClass extends AbstractClassifier { 30 34 35 /** 36 * default serialization id 37 */ 31 38 private static final long serialVersionUID = 1L; 32 39 40 /** 41 * class values 42 */ 33 43 private double[] fixedClassValues = 34 44 { 0.0d, 1.0d }; 35 45 46 /* 47 * (non-Javadoc) 48 * 49 * @see weka.classifiers.Classifier#buildClassifier(weka.core.Instances) 50 */ 36 51 @Override 37 52 public void buildClassifier(Instances arg0) throws Exception { … … 39 54 } 40 55 56 /* 57 * (non-Javadoc) 58 * 59 * @see weka.classifiers.AbstractClassifier#classifyInstance(weka.core.Instance) 60 */ 41 61 @Override 42 62 public double classifyInstance(Instance instance) {
Note: See TracChangeset
for help on using the changeset viewer.