anchor.diff:  (defstruct (forest (:constructor %make-forest)
                      (:print-object %print-forest))
     n-tree bagging-ratio datamatrix target dtree-list
  -  n-class class-count-array ; for classification
  +  ;; for classification
  +  n-class class-count-array
     datum-dim max-depth min-region-samples n-trial gain-test
  -  index-offset ; for global refinement
  -  )
  +  ;; for global refinement
  +  n-leaf index-offset)
   
   (defun %print-forest (obj stream)
     (if (forest-n-class obj)
  
positive.code:           do (setf (dtree-id dtree) i))
      ;; set leaf-id
      (set-leaf-index-forest! forest)
      forest))
  
  (defun make-regression-forest (datamatrix target
  
negative.code:            (declare (type fixnum tree-id offset))
             (loop for i fixnum from 0 below len do
               (let ((leaf-index (node-leaf-index (find-leaf (dtree-root dtree) datamatrix i)))
                     (refine-datum (svref refine-dataset i)))
                 (declare (type fixnum leaf-index)
                          (type (simple-array fixnum) refine-datum))
                 (setf (aref refine-datum tree-id) (+ leaf-index offset))))))
         (forest-dtree-list forest))
        refine-dataset)))
  
  