public Instances transform(Instances D) throws Exception {
  int L=D.classIndex();
  d=D.numAttributes() - L;
  int keep[]=A.append(this.paY,j);
  Arrays.sort(keep);
  int remv[]=A.invert(keep,L);
  Arrays.sort(remv);
  map=new int[L];
  for (int j=0; j < L; j++) {
    map[j]=Arrays.binarySearch(keep,j);
  }
  Instances D_=F.remove(new Instances(D),remv,false);
  D_.setClassIndex(map[this.j]);
  return D_;
}

public Instances transform ( Instances D ) throws Exception { int L = D . classIndex ( ) ; d = D . numAttributes ( ) - L ; int keep [ ] = A . append ( this . paY , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = 0 ; j < L ; j ++ ) { map [ j ] = Arrays . binarySearch ( keep , j ) ; } Instances D_ = F . remove ( new Instances ( D ) , remv , false ) ; D_ . setClassIndex ( map [ this . j ] ) ; return D_ ; }
transform - transform dataset d for this node . this . j defines the current node index , e . g . , 3 this . pay [ ] defines parents , e . g . , [ 1 , 4 ] we should remove the rest , e . g . , [ 0 , 2 , 5 , . . . , l - 1 ]
