(self, tree_adapter, weight_adjustment=lambda x: x,
                 target_class_index=0)
Pass in a new tree adapter instance and perform updates to canvas.

        Parameters
        ----------
        tree_adapter : TreeAdapter
            The new tree adapter that is to be used.
        weight_adjustment : callable
            A weight adjustment function that with signature `x -> x`
        target_class_index : int

        Returns
        -------
Pass in a new tree adapter instance and perform updates to canvas.
Pass in a new tree adapter instance and perform updates to canvas .
def set_tree(self, tree_adapter, weight_adjustment=lambda x: x,
                 target_class_index=0):
        """Pass in a new tree adapter instance and perform updates to canvas.

        Parameters
        ----------
        tree_adapter : TreeAdapter
            The new tree adapter that is to be used.
        weight_adjustment : callable
            A weight adjustment function that with signature `x -> x`
        target_class_index : int

        Returns
        -------

        """
        self.clear_tree()
        self.tree_adapter = tree_adapter
        self.weight_adjustment = weight_adjustment

        if self.tree_adapter is not None:
            self.root = self._calculate_tree(self.tree_adapter, self.weight_adjustment)
            self.set_depth_limit(tree_adapter.max_depth)
            self.target_class_changed(target_class_index)
            self._draw_tree(self.root)
def set_tree ( self , tree_adapter , weight_adjustment = lambda x : x , target_class_index = 0 ) : self . clear_tree ( ) self . tree_adapter = tree_adapter self . weight_adjustment = weight_adjustment if self . tree_adapter is not None : self . root = self . _calculate_tree ( self . tree_adapter , self . weight_adjustment ) self . set_depth_limit ( tree_adapter . max_depth ) self . target_class_changed ( target_class_index ) self . _draw_tree ( self . root )