Instances data = new Instances(insts);
Instances data = insts;
    public Instances[] splitData(Instances insts, double defAcRt, 				 double cl){      Instances data = new Instances(insts);      int total=data.numInstances();// Total number of instances without       // missing value for att	          int split=1;                  // Current split position      int prev=0;                   // Previous split position      int finalSplit=split;         // Final split position      maxInfoGain = 0;      value = 0;		          double fstCover=0, sndCover=0, fstAccu=0, sndAccu=0;	          data.sort(att);      // Find the las instance without missing value       for(int x=0; x<data.numInstances(); x++){	Instance inst = data.instance(x);	if(inst.isMissing(att)){	  total = x;	  break;	}			sndCover += inst.weight();	if(Utils.eq(inst.classValue(), cl))	  sndAccu += inst.weight();		      }	          if(total == 0) return null; // Data all missing for the attribute      splitPoint = data.instance(total-1).value(att);		          for(; split <= total; split++){	if((split == total) ||	   (data.instance(split).value(att) > // Can't split within	    data.instance(prev).value(att))){ // same value	    		    	  for(int y=prev; y<split; y++){	    Instance inst = data.instance(y);	    fstCover += inst.weight(); 	    if(Utils.eq(data.instance(y).classValue(), cl)){	      fstAccu += inst.weight();  // First bag positive# ++	    }	     		   	  }		    	  double fstAccuRate = (fstAccu+1.0)/(fstCover+1.0),	    sndAccuRate = (sndAccu+1.0)/(sndCover+1.0);		    	  /* Which bag has higher information gain? */	  boolean isFirst; 	  double fstInfoGain, sndInfoGain;	  double accRate, infoGain, coverage, accurate;		    	  fstInfoGain = 	    //Utils.eq(defAcRt, 1.0) ? 	    //fstAccu/(double)numConds : 	    fstAccu*(Utils.log2(fstAccuRate)-Utils.log2(defAcRt));		    	  sndInfoGain = 	    //Utils.eq(defAcRt, 1.0) ? 	    //sndAccu/(double)numConds : 	    sndAccu*(Utils.log2(sndAccuRate)-Utils.log2(defAcRt));		    	  if(fstInfoGain > sndInfoGain){	    isFirst = true;	    infoGain = fstInfoGain;	    accRate = fstAccuRate;	    accurate = fstAccu;	    coverage = fstCover;	  }	  else{	    isFirst = false;	    infoGain = sndInfoGain;	    accRate = sndAccuRate;	    accurate = sndAccu;	    coverage = sndCover;	  }		    	  /* Check whether so far the max infoGain */	  if(infoGain > maxInfoGain){	    splitPoint = data.instance(prev).value(att);	    value = (isFirst) ? 0 : 1;	    accuRate = accRate;	    accu = accurate;	    cover = coverage;	    maxInfoGain = infoGain;	    finalSplit = (isFirst) ? split : prev;	  }		    	  for(int y=prev; y<split; y++){	    Instance inst = data.instance(y);	    sndCover -= inst.weight(); 	    if(Utils.eq(data.instance(y).classValue(), cl)){	      sndAccu -= inst.weight();  // Second bag positive# --	    }	     		   	  }		    	  prev=split;	}      }	          /* Split the data */      Instances[] splitData = new Instances[2];      splitData[0] = new Instances(data, 0, finalSplit);      splitData[1] = new Instances(data, finalSplit, total-finalSplit);	          return splitData;    }