/** * Build the clusterer on the filtered data. * * @param data the training data * @throws Exception if the clusterer could not be built successfully */ @Override public void buildClusterer(Instances data) throws Exception { if (m_Clusterer == null) { throw new Exception("No base clusterer has been set!"); } // remove instances with missing class if (data.classIndex() > -1) { data = new Instances(data); data.deleteWithMissingClass(); } m_Filter.setInputFormat(data); // filter capabilities are checked here data = Filter.useFilter(data, m_Filter); // can clusterer handle the data? getClusterer().getCapabilities().testWithFail(data); m_FilteredInstances = data.stringFreeStructure(); m_Clusterer.buildClusterer(data); }
cList.add((Canopy) ((FilteredClusterer) c).getClusterer());
/** * Build the clusterer on the filtered data. * * @param data the training data * @throws Exception if the clusterer could not be built successfully */ @Override public void buildClusterer(Instances data) throws Exception { if (m_Clusterer == null) { throw new Exception("No base clusterer has been set!"); } // remove instances with missing class if (data.classIndex() > -1) { data = new Instances(data); data.deleteWithMissingClass(); } m_Filter.setInputFormat(data); // filter capabilities are checked here data = Filter.useFilter(data, m_Filter); // can clusterer handle the data? getClusterer().getCapabilities().testWithFail(data); m_FilteredInstances = data.stringFreeStructure(); m_Clusterer.buildClusterer(data); }