private ArrayList<Test> generateTestList(Random random,Instance example) throws Exception {
  Instances format=getDatasetFormat();
  if (format == null) {
    throw new Exception("Dataset format not defined.");
  }
  int numTests=getNumAttributes() - getNumIrrelevant();
  ArrayList<Test> TestList=new ArrayList<Test>(numTests);
  boolean[] irrelevant=getAttList_Irr();
  for (int i=0; i < getNumAttributes(); i++) {
    if (!irrelevant[i]) {
      Test newTest=null;
      Attribute att=example.attribute(i);
      if (att.isNumeric()) {
        double newSplit=random.nextDouble();
        boolean newNot=newSplit < example.value(i);
        newTest=new Test(i,newSplit,format,newNot);
      }
 else {
        newTest=new Test(i,example.value(i),format,false);
      }
      TestList.add(newTest);
    }
  }
  return TestList;
}

private ArrayList < Test > generateTestList ( Random random , Instance example ) throws Exception { Instances format = getDatasetFormat ( ) ; if ( format == null ) { throw new Exception ( "Dataset format not defined." ) ; } int numTests = getNumAttributes ( ) - getNumIrrelevant ( ) ; ArrayList < Test > TestList = new ArrayList < Test > ( numTests ) ; boolean [ ] irrelevant = getAttList_Irr ( ) ; for ( int i = 0 ; i < getNumAttributes ( ) ; i ++ ) { if ( ! irrelevant [ i ] ) { Test newTest = null ; Attribute att = example . attribute ( i ) ; if ( att . isNumeric ( ) ) { double newSplit = random . nextDouble ( ) ; boolean newNot = newSplit < example . value ( i ) ; newTest = new Test ( i , newSplit , format , newNot ) ; } else { newTest = new Test ( i , example . value ( i ) , format , false ) ; } TestList . add ( newTest ) ; } } return TestList ; }
generates a new rule for the decision list and classifies the new example .
