private Instances voteDataset(Instances dataset) throws Exception {
  for (int i=0; i < dataset.numInstances(); i++) {
    Instance inst=dataset.firstInstance();
    inst=votedReclassifyExample(inst);
    dataset.add(inst);
    dataset.delete(0);
  }
  return dataset;
}

private Instances voteDataset ( Instances dataset ) throws Exception { for ( int i = 0 ; i < dataset . numInstances ( ) ; i ++ ) { Instance inst = dataset . firstInstance ( ) ; inst = votedReclassifyExample ( inst ) ; dataset . add ( inst ) ; dataset . delete ( 0 ) ; } return dataset ; }
resets the class values of all instances using voting . for each instance the class value that satisfies the most rules is choosen as new class value .
