Instances data=new Instances(pruneData);
Instances data = pruneData;
    public void prune(Instances pruneData, boolean useWhole){      Instances data=new Instances(pruneData);	      double total = data.sumOfWeights();      if(!Utils.gr(total, 0.0))	return;	      /* The default accurate # and rate on pruning data */      double defAccu=computeDefAccu(pruneData);	          if(m_Debug)		System.err.println("Pruning with " + defAccu + 			   " positive data out of " + total +			   " instances");		          int size=m_Antds.size();      if(size == 0) return; // Default rule before pruning	          double[] worthRt = new double[size];      double[] coverage = new double[size];      double[] worthValue = new double[size];      for(int w=0; w<size; w++){	worthRt[w]=coverage[w]=worthValue[w]=0.0;      }	          /* Calculate accuracy parameters for all the antecedents in this rule */      double tn = 0.0; // True negative if useWhole      for(int x=0; x<size; x++){	Antd antd=(Antd)m_Antds.elementAt(x);	Attribute attr= antd.getAttr();	Instances newData = new Instances(data);	data = new Instances(newData, 0); // Make data empty			for(int y=0; y<newData.numInstances(); y++){	  Instance ins=newData.instance(y);		    	  if(antd.covers(ins)){   // Covered by this antecedent	    coverage[x] += ins.weight();	    data.add(ins);                 // Add to data for further pruning	    if((int)ins.classValue() == (int)m_Consequent) // Accurate prediction	      worthValue[x] += ins.weight();	  }	  else if(useWhole){ // Not covered	    if((int)ins.classValue() != (int)m_Consequent)	      tn += ins.weight();	  }				}			if(useWhole){	  worthValue[x] += tn;	  worthRt[x] = worthValue[x] / total;	}	else // Note if coverage is 0, accuracy is 0.5	  worthRt[x] = (worthValue[x]+1.0)/(coverage[x]+2.0);      }	          double maxValue = (defAccu+1.0)/(total+2.0);      int maxIndex = -1;      for(int i=0; i<worthValue.length; i++){	if(m_Debug){	  double denom = useWhole ? total : coverage[i];	  System.err.println(i+"(useAccuray? "+!useWhole+"): "			     + worthRt[i] + 			     "="+worthValue[i]+			     "/"+denom);	}	if(worthRt[i] > maxValue){ // Prefer to the 	  maxValue = worthRt[i]; // shorter rule	  maxIndex = i;	}      }	          /* Prune the antecedents according to the accuracy parameters */      for(int z=size-1;z>maxIndex;z--)	m_Antds.removeElementAt(z);           }