protected boolean[] datasetIntegrity(boolean nominalPredictor,boolean numericPredictor,boolean stringPredictor,boolean datePredictor,boolean relationalPredictor,boolean multiInstance,boolean predictorMissing){
  print("clusterer doesn't alter original datasets");
  printAttributeSummary(nominalPredictor,numericPredictor,stringPredictor,datePredictor,relationalPredictor,multiInstance);
  print("...");
  int numTrain=getNumInstances(), missingLevel=20;
  boolean[] result=new boolean[2];
  Instances train=null;
  Clusterer clusterer=null;
  try {
    train=makeTestDataset(42,numTrain,nominalPredictor ? getNumNominal() : 0,numericPredictor ? getNumNumeric() : 0,stringPredictor ? getNumString() : 0,datePredictor ? getNumDate() : 0,relationalPredictor ? getNumRelational() : 0,multiInstance);
    if (nominalPredictor && !multiInstance) {
      train.deleteAttributeAt(0);
    }
    if (missingLevel > 0) {
      addMissing(train,missingLevel,predictorMissing);
    }
    clusterer=AbstractClusterer.makeCopies(getClusterer(),1)[0];
  }
 catch (  Exception ex) {
    throw new Error("Error setting up for tests: " + ex.getMessage());
  }
  try {
    Instances trainCopy=new Instances(train);
    clusterer.buildClusterer(trainCopy);
    compareDatasets(train,trainCopy);
    println("yes");
    result[0]=true;
  }
 catch (  Exception ex) {
    println("no");
    result[0]=false;
    if (m_Debug) {
      println("\n=== Full Report ===");
      print("Problem during training");
      println(": " + ex.getMessage() + "\n");
      println("Here is the dataset:\n");
      println("=== Train Dataset ===\n" + train.toString() + "\n");
    }
  }
  return result;
}

protected boolean [ ] datasetIntegrity ( boolean nominalPredictor , boolean numericPredictor , boolean stringPredictor , boolean datePredictor , boolean relationalPredictor , boolean multiInstance , boolean predictorMissing ) { print ( "clusterer doesn't alter original datasets" ) ; printAttributeSummary ( nominalPredictor , numericPredictor , stringPredictor , datePredictor , relationalPredictor , multiInstance ) ; print ( "..." ) ; int numTrain = getNumInstances ( ) , missingLevel = 20 ; boolean [ ] result = new boolean [ 2 ] ; Instances train = null ; Clusterer clusterer = null ; try { train = makeTestDataset ( 42 , numTrain , nominalPredictor ? getNumNominal ( ) : 0 , numericPredictor ? getNumNumeric ( ) : 0 , stringPredictor ? getNumString ( ) : 0 , datePredictor ? getNumDate ( ) : 0 , relationalPredictor ? getNumRelational ( ) : 0 , multiInstance ) ; if ( nominalPredictor && ! multiInstance ) { train . deleteAttributeAt ( 0 ) ; } if ( missingLevel > 0 ) { addMissing ( train , missingLevel , predictorMissing ) ; } clusterer = AbstractClusterer . makeCopies ( getClusterer ( ) , 1 ) [ 0 ] ; } catch ( Exception ex ) { throw new Error ( "Error setting up for tests: " + ex . getMessage ( ) ) ; } try { Instances trainCopy = new Instances ( train ) ; clusterer . buildClusterer ( trainCopy ) ; compareDatasets ( train , trainCopy ) ; println ( "yes" ) ; result [ 0 ] = true ; } catch ( Exception ex ) { println ( "no" ) ; result [ 0 ] = false ; if ( m_Debug ) { println ( "\n=== Full Report ===" ) ; print ( "Problem during training" ) ; println ( ": " + ex . getMessage ( ) + "\n" ) ; println ( "Here is the dataset:\n" ) ; println ( "=== Train Dataset ===\n" + train . toString ( ) + "\n" ) ; } } return result ; }
checks whether the scheme alters the training dataset during training . if the scheme needs to modify the training data it should take a copy of the training data . currently checks for changes to header structure , number of instances , order of instances , instance weights .
