protected boolean[] datasetIntegrity(boolean nominalPredictor,boolean numericPredictor,boolean stringPredictor,boolean datePredictor,boolean relationalPredictor,boolean multiInstance,int classType,boolean predictorMissing,boolean classMissing){
  print("scheme doesn't alter original datasets");
  printAttributeSummary(nominalPredictor,numericPredictor,stringPredictor,datePredictor,relationalPredictor,multiInstance,classType);
  print("...");
  int numTrain=getNumInstances(), numClasses=2, missingLevel=20;
  boolean[] result=new boolean[2];
  Instances train=null;
  Instances trainCopy=null;
  ASSearch search=null;
  ASEvaluation evaluation=null;
  try {
    train=makeTestDataset(42,numTrain,nominalPredictor ? getNumNominal() : 0,numericPredictor ? getNumNumeric() : 0,stringPredictor ? getNumString() : 0,datePredictor ? getNumDate() : 0,relationalPredictor ? getNumRelational() : 0,numClasses,classType,multiInstance);
    if (missingLevel > 0) {
      addMissing(train,missingLevel,predictorMissing,classMissing);
    }
    search=ASSearch.makeCopies(getSearch(),1)[0];
    evaluation=ASEvaluation.makeCopies(getEvaluator(),1)[0];
    trainCopy=new Instances(train);
  }
 catch (  Exception ex) {
    throw new Error("Error setting up for tests: " + ex.getMessage());
  }
  try {
    search(search,evaluation,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 are the datasets:\n");
      println("=== Train Dataset (original) ===\n" + trainCopy.toString() + "\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 , int classType , boolean predictorMissing , boolean classMissing ) { print ( "scheme doesn't alter original datasets" ) ; printAttributeSummary ( nominalPredictor , numericPredictor , stringPredictor , datePredictor , relationalPredictor , multiInstance , classType ) ; print ( "..." ) ; int numTrain = getNumInstances ( ) , numClasses = 2 , missingLevel = 20 ; boolean [ ] result = new boolean [ 2 ] ; Instances train = null ; Instances trainCopy = null ; ASSearch search = null ; ASEvaluation evaluation = null ; try { train = makeTestDataset ( 42 , numTrain , nominalPredictor ? getNumNominal ( ) : 0 , numericPredictor ? getNumNumeric ( ) : 0 , stringPredictor ? getNumString ( ) : 0 , datePredictor ? getNumDate ( ) : 0 , relationalPredictor ? getNumRelational ( ) : 0 , numClasses , classType , multiInstance ) ; if ( missingLevel > 0 ) { addMissing ( train , missingLevel , predictorMissing , classMissing ) ; } search = ASSearch . makeCopies ( getSearch ( ) , 1 ) [ 0 ] ; evaluation = ASEvaluation . makeCopies ( getEvaluator ( ) , 1 ) [ 0 ] ; trainCopy = new Instances ( train ) ; } catch ( Exception ex ) { throw new Error ( "Error setting up for tests: " + ex . getMessage ( ) ) ; } try { search ( search , evaluation , 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 are the datasets:\n" ) ; println ( "=== Train Dataset (original) ===\n" + trainCopy . toString ( ) + "\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 .
