/** * Main method for testing this class. * * @param argv should contain the following arguments: * <p> * -t training file [-T test file] [-N number of clusters] [-S random * seed] */ public static void main(String[] argv) { runClusterer(new EM(), argv); } }
/** * Main method for testing this class. * * @param argv should contain the following arguments: * <p> * -t training file [-T test file] [-N number of clusters] [-S random * seed] */ public static void main(String[] argv) { runClusterer(new EM(), argv); } }
/** * returns the default clusterer (fully configured) for the clusterer panel. * * @return the default clusterer, EM by default */ public static Object getClusterer() { Object result; result = getObject("Clusterer", weka.clusterers.EM.class.getName(), weka.clusterers.Clusterer.class); if (result == null) { result = new weka.clusterers.EM(); } return result; }
/** Creates a default EM */ public Clusterer getClusterer() { return new EM(); }
/** Creates a default EM */ public Clusterer getClusterer() { return new EM(); }
/** * returns the default clusterer (fully configured) for the clusterer panel. * * @return the default clusterer, EM by default */ public static Object getClusterer() { Object result; result = getObject("Clusterer", weka.clusterers.EM.class.getName(), weka.clusterers.Clusterer.class); if (result == null) { result = new weka.clusterers.EM(); } return result; }
EM clusterer = new EM(); clusterer.buildClusterer(dataClusterer);
/** * returns a configured cluster algorithm */ protected Clusterer getClusterer() { EM c = new EM(); try { c.setOptions(new String[0]); } catch (Exception e) { e.printStackTrace(); } return c; }
/** * returns a configured cluster algorithm */ protected Clusterer getClusterer() { EM c = new EM(); try { c.setOptions(new String[0]); } catch (Exception e) { e.printStackTrace(); } return c; }
// generate data for clusterer (w/o class) Remove filter = new Remove(); filter.setAttributeIndices("" + (data.classIndex() + 1)); try { filter.setInputFormat(data); } catch (Exception e) { e.printStackTrace(); } Instances dataClusterer = Filter.useFilter(data, filter); // train clusterer EM clusterer = new EM(); // set further options for EM, if necessary... // clusterer.setNumClusters(maxNumofClusters); //-1 for n number of clusters clusterer.buildClusterer(dataClusterer);
EM clusterer = new EM(); try {