System.out.println("New best subset ("
System.out.print("New best subset ("
   public int[] search (int[] startSet, ASEvaluation ASEval, Instances data)     throws Exception {     double best_merit;     int sizeOfBest = m_numAttribs;     BitSet temp;          m_onlyConsiderBetterAndSmaller = false;     if (!(ASEval instanceof SubsetEvaluator)) {       throw  new Exception(ASEval.getClass().getName() 			    + " is not a " 			    + "Subset evaluator!");     }     m_random = new Random(m_seed);          if (startSet != null) {       m_starting = startSet;     }          if (ASEval instanceof UnsupervisedSubsetEvaluator) {       m_hasClass = false;     }     else {       m_hasClass = true;       m_classIndex = data.classIndex();     }          SubsetEvaluator ASEvaluator = (SubsetEvaluator)ASEval;     m_numAttribs = data.numAttributes();     // If a starting subset has been supplied, then initialise the bitset     if (m_starting != null) {       for (int i = 0; i < m_starting.length; i++) {	 if ((m_starting[i]) != m_classIndex) {	   m_bestGroup.set(m_starting[i]);	 }       }       m_onlyConsiderBetterAndSmaller = true;       best_merit = ASEvaluator.evaluateSubset(m_bestGroup);       sizeOfBest = countFeatures(m_bestGroup);     } else {       // do initial random subset       m_bestGroup = generateRandomSubset();       best_merit = ASEvaluator.evaluateSubset(m_bestGroup);     }          if (m_verbose) {       System.out.println("Initial subset ("			  +Utils.doubleToString(Math.						abs(best_merit),8,5)			  +"): "+printSubset(m_bestGroup));     }     int i;     if (m_hasClass) {       i = m_numAttribs -1;     } else {       i = m_numAttribs;     }     m_iterations = (int)((m_searchSize * Math.pow(2, i)));          int tempSize;     double tempMerit;     // main loop     for (i=0;i<m_iterations;i++) {       temp = generateRandomSubset();       if (m_onlyConsiderBetterAndSmaller) {	 tempSize = countFeatures(temp);	 if (tempSize <= sizeOfBest) {	   tempMerit = ASEvaluator.evaluateSubset(temp);	   if (tempMerit >= best_merit) {	     sizeOfBest = tempSize;	     m_bestGroup = temp;	     best_merit = tempMerit;	     if (m_verbose) {	       System.out.println("New best subset ("				  +Utils.doubleToString(Math.							abs(best_merit),8,5)				  +"): "+printSubset(m_bestGroup));	     }	   }	 }       } else {	 tempMerit = ASEvaluator.evaluateSubset(temp);	 if (tempMerit > best_merit) {	   m_bestGroup = temp;	   best_merit = tempMerit;	   if (m_verbose) {	     System.out.println("New best subset ("				+Utils.doubleToString(Math.abs(best_merit),8,5)				+"): "+printSubset(m_bestGroup));	   }	 }       }     }     m_bestMerit = best_merit;     return attributeList(m_bestGroup);   }