protected String useClusterer(Instances data) throws Exception {
  String result;
  Clusterer clusterer;
  int i;
  double cluster;
  try {
    clusterer=AbstractClusterer.makeCopy(m_Clusterer);
  }
 catch (  Exception e) {
    clusterer=null;
    e.printStackTrace();
    fail("Problem setting up to use Clusterer: " + e);
  }
  clusterer.buildClusterer(data);
  result="";
  for (i=0; i < data.numInstances(); i++) {
    if (i > 0)     result+="\n";
    try {
      cluster=clusterer.clusterInstance(data.instance(i));
      result+="" + (i + 1) + ": "+ cluster;
    }
 catch (    Exception e) {
      result+="" + (i + 1) + ": "+ e.toString();
    }
  }
  return result;
}

protected String useClusterer ( Instances data ) throws Exception { String result ; Clusterer clusterer ; int i ; double cluster ; try { clusterer = AbstractClusterer . makeCopy ( m_Clusterer ) ; } catch ( Exception e ) { clusterer = null ; e . printStackTrace ( ) ; fail ( "Problem setting up to use Clusterer: " + e ) ; } clusterer . buildClusterer ( data ) ; result = "" ; for ( i = 0 ; i < data . numInstances ( ) ; i ++ ) { if ( i > 0 ) result += "\n" ; try { cluster = clusterer . clusterInstance ( data . instance ( i ) ) ; result += "" + ( i + 1 ) + ": " + cluster ; } catch ( Exception e ) { result += "" + ( i + 1 ) + ": " + e . toString ( ) ; } } return result ; }
builds a model using the current clusterer using the given data and returns the produced cluster assignments .
