for(j=0;j<instances.numAttributes()-1;j++){
for(j=0;j<instances.numAttributes();j++){
  public final void  split(Instances inst) throws Exception {    SplitInfo s,sMax;    int j, partition;    Instances leftInst,rightInst;    instances = inst;    if(instances.numInstances() < SPLIT_NUM  ||        M5Utils.stdDev(instances.classIndex(),instances) < deviation * 0.05)       type = false;    else {        sMax = new SplitInfo(0,instances.numInstances()-1,-1);      s = new SplitInfo(0,instances.numInstances()-1,-1);      for(j=0;j<instances.numAttributes()-1;j++){	if(j != instances.classIndex()){	  instances.sort(instances.attribute(j));	  s.attrSplit(j,instances);	  if((Math.abs(s.maxImpurity - sMax.maxImpurity) > 1.e-6)  && 	     (s.maxImpurity > sMax.maxImpurity + 1.e-6)) 	    sMax = s.copy(); 	}      }            if(sMax.splitAttr < 0 || sMax.position < 1 || sMax.position > 	 instances.numInstances()-1) type = false;      if(type == true){	sf = sMax;	splitAttr = sMax.splitAttr;               // split attribute	splitValue = sMax.splitValue;             // split value	unsmoothed = new Function(splitAttr);     // unsmoothed function	leftInst = new Instances(instances, instances.numInstances());	rightInst = new Instances(instances, instances.numInstances());	for (int i = 0; i < instances.numInstances(); i++)	  if (instances.instance(i).value(splitAttr) <= splitValue)	    leftInst.add(instances.instance(i));	  else	    rightInst.add(instances.instance(i));	leftInst.compactify();	rightInst.compactify();	leftNode = new Node(leftInst,this);	leftNode.split(leftInst);                 // split left node	rightNode = new Node(rightInst,this);	rightNode.split(rightInst);                // split right node		this.valueNode();                      // function of the constant value 		if(model != REGRESSION_TREE){	  unsmoothed = Function.combine(unsmoothed,leftNode.unsmoothed); 	                 // passes up the attributes found under the left node	  unsmoothed = Function.combine(unsmoothed,rightNode.unsmoothed); 	                 // passes up the attributes found under the right node	}	else unsmoothed = new Function();      }    }    if(type==false){                              // a leaf node      this.leafNode();      errors = unsmoothed.errors(instances);    }  }