protected String useKernel(Instances data) throws Exception {
  Kernel kernel=null;
  StringBuffer text=new StringBuffer();
  try {
    kernel=Kernel.makeCopy(m_Kernel);
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("Problem setting up to use Kernel: " + e);
  }
  kernel.buildKernel(data);
  for (int n=0; n < data.numInstances(); n++) {
    for (int i=n; i < data.numInstances(); i++) {
      text.append((n + 1) + "-" + (i + 1)+ ": "+ kernel.eval(n,i,data.instance(i))+ "\n");
    }
  }
  return text.toString();
}

protected String useKernel ( Instances data ) throws Exception { Kernel kernel = null ; StringBuffer text = new StringBuffer ( ) ; try { kernel = Kernel . makeCopy ( m_Kernel ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; fail ( "Problem setting up to use Kernel: " + e ) ; } kernel . buildKernel ( data ) ; for ( int n = 0 ; n < data . numInstances ( ) ; n ++ ) { for ( int i = n ; i < data . numInstances ( ) ; i ++ ) { text . append ( ( n + 1 ) + "-" + ( i + 1 ) + ": " + kernel . eval ( n , i , data . instance ( i ) ) + "\n" ) ; } } return text . toString ( ) ; }
builds a model using the current kernel using the given data and returns the produced output .
