Ignore:
Timestamp:
05/06/16 15:52:27 (9 years ago)
Author:
sherbold
Message:
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  
    1616 
    1717import weka.classifiers.AbstractClassifier; 
    18 import weka.classifiers.Classifier; 
    1918import weka.core.Capabilities; 
    2019import weka.core.Instance; 
     
    2827 * @author Steffen Herbold 
    2928 */ 
    30 public class FixClass extends AbstractClassifier implements ITrainingStrategy, 
    31     IWekaCompatibleTrainer 
    32 { 
     29public class FixClass extends AbstractClassifier { 
    3330 
    3431    private static final long serialVersionUID = 1L; 
     
    7976        // do nothing 
    8077    } 
    81  
    82     @Override 
    83     public void setParameter(String parameters) { 
    84         try { 
    85             this.setOptions(parameters.split(" ")); 
    86         } 
    87         catch (Exception e) { 
    88             e.printStackTrace(); 
    89         } 
    90     } 
    91  
    92     @Override 
    93     public void apply(Instances traindata) { 
    94         // do nothing! 
    95     } 
    96  
    97     @Override 
    98     public String getName() { 
    99         return "FixClass"; 
    100     } 
    101  
    102     @Override 
    103     public Classifier getClassifier() { 
    104         return this; 
    105     } 
    106  
    10778} 
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/training/RandomClass.java

    r41 r78  
    1818 
    1919import weka.classifiers.AbstractClassifier; 
    20 import weka.classifiers.Classifier; 
    2120import weka.core.Instance; 
    2221import weka.core.Instances; 
     
    2827 * values from the XML configuration. 
    2928 */ 
    30 public class RandomClass extends AbstractClassifier implements ITrainingStrategy, 
    31     IWekaCompatibleTrainer 
    32 { 
     29public class RandomClass extends AbstractClassifier { 
    3330 
    3431    private static final long serialVersionUID = 1L; 
     
    3835 
    3936    @Override 
    40     public void setParameter(String parameters) { 
    41         // do nothing, maybe take percentages for distribution later 
    42     } 
    43  
    44     @Override 
    4537    public void buildClassifier(Instances arg0) throws Exception { 
    4638        // do nothing 
    47     } 
    48  
    49     @Override 
    50     public Classifier getClassifier() { 
    51         return this; 
    52     } 
    53  
    54     @Override 
    55     public void apply(Instances traindata) { 
    56         // nothing to do 
    57     } 
    58  
    59     @Override 
    60     public String getName() { 
    61         return "RandomClass"; 
    6239    } 
    6340 
Note: See TracChangeset for help on using the changeset viewer.