Package weka.classifiers.misc

Examples of weka.classifiers.misc.InputMappedClassifier


  public InputMappedClassifierTest(String name) { super(name)}

  /** Creates a default InputMappedClassifier */
  public Classifier getClassifier() {
    InputMappedClassifier toUse = new InputMappedClassifier();
    toUse.setClassifier(new weka.classifiers.trees.J48());
    toUse.setSuppressMappingReport(true);
    return toUse;
  }
View Full Code Here


      } catch (Exception ex) {
        fail("Reordering test data failed: " + ex);
      }
    }
   
    InputMappedClassifier toUse = null;
   
    try {
      toUse = trainClassifier(train, nomClass);
    } catch (Exception ex) {
      fail("Training classifier failed: " + ex);
View Full Code Here

  public void testNumericClassSwapNominalValuesReorderAtts() {
    performTest(false, 4, 3, true, true, false);
  }
 
  protected InputMappedClassifier trainClassifier(Instances data, boolean nominalClass) {
    InputMappedClassifier toUse = new InputMappedClassifier();
    if (nominalClass) {
      toUse.setClassifier(new weka.classifiers.trees.J48());
    } else {
      toUse.setClassifier(new weka.classifiers.functions.LinearRegression());
    }
    toUse.setSuppressMappingReport(true);
   
    try {
      toUse.buildClassifier(data);
    } catch (Exception ex) {
      fail("Training InputMappedClassifier failed: " + ex);
      return null;
    }
   
View Full Code Here

TOP

Related Classes of weka.classifiers.misc.InputMappedClassifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.