Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.AddCluster


    data.setClassIndex(-1);
   
    /*
     * make clustering with EM and add label instances
     */
    AddCluster filter = new AddCluster();
    String[] options = new String[2];
    options[0] = "-W";                                    // "cluster options"
    options[1] = "weka.clusterers.EM -I 100 -N -1 -M 1.0E-6 -S 100";
    filter.setOptions(options);
    filter.setInputFormat(data);
    data = Filter.useFilter(data, filter);
    System.out.println("Filtered data:"+data);
   
    /*
     * Remove score attribute
View Full Code Here


  public void setup(Filter beanthrows Exception {
    weka.filters.Filter filter =  bean.getFilter();
    String className = filter.getClass().getName();
    log("Class: " + className);
    if(className.equalsIgnoreCase(AddCluster.class.getName())) {
      AddCluster addCluster = (AddCluster)filter;
      StringBuffer buffer = new StringBuffer();
      buffer.append("Options: ");
      String[] options = addCluster.getOptions();   
      for(int i = 0; i < options.length; i++) {
        buffer.append(options[i] + "; ");
      }
      log(buffer.toString());
      Clusterer clusterer = addCluster.getClusterer();
      log(addCluster.getClusterer().getClass().getName());
    }
  }
View Full Code Here

TOP

Related Classes of weka.filters.unsupervised.attribute.AddCluster

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.