throw new Exception("All instances have missing class! (RaceSearch)");
throw new Exception("All train instances have missing class! (RaceSearch)");
  public int[] search (ASEvaluation ASEval, Instances data)    throws Exception {    if (!(ASEval instanceof SubsetEvaluator)) {      throw  new Exception(ASEval.getClass().getName() 			   + " is not a " 			   + "Subset evaluator! (RaceSearch)");    }    if (ASEval instanceof UnsupervisedSubsetEvaluator) {      throw new Exception("Can't use an unsupervised subset evaluator "			  +"(RaceSearch).");    }    if (!(ASEval instanceof HoldOutSubsetEvaluator)) {      throw new Exception("Must use a HoldOutSubsetEvaluator, eg. "			  +"weka.attributeSelection.ClassifierSubsetEval "			  +"(RaceSearch)");    }    if (!(ASEval instanceof ErrorBasedMeritEvaluator)) {      throw new Exception("Only error based subset evaluators can be used, "			  +"eg. weka.attributeSelection.ClassifierSubsetEval "			  +"(RaceSearch)");    }    m_Instances = new Instances(data);    m_Instances.deleteWithMissingClass();    if (m_Instances.numInstances() == 0) {      throw new Exception("All instances have missing class! (RaceSearch)");    }    if (m_rankingRequested && m_numToSelect > m_Instances.numAttributes()-1) {      throw new Exception("More attributes requested than exist in the data "			  +"(RaceSearch).");    }    m_theEvaluator = (HoldOutSubsetEvaluator)ASEval;    m_numAttribs = m_Instances.numAttributes();    m_classIndex = m_Instances.classIndex();    if (m_rankingRequested) {      m_rankedAtts = new double[m_numAttribs-1][2];      m_rankedSoFar = 0;    }    if (m_xvalType == LEAVE_ONE_OUT) {      m_numFolds = m_Instances.numInstances();    } else {      m_numFolds = 10;    }    Random random = new Random(1); // I guess this should really be a parameter?    m_Instances.randomize(random);    int [] bestSubset=null;    switch (m_raceType) {    case FORWARD_RACE:    case BACKWARD_RACE:       bestSubset = hillclimbRace(m_Instances, random);      break;    case SCHEMATA_RACE:      bestSubset = schemataRace(m_Instances, random);      break;    case RANK_RACE:      bestSubset = rankRace(m_Instances, random);      break;    }    return bestSubset;  }