woodpecker/sklearn/decisiontree/decision_tree_structure_classifier.py
def show_leaf_impurity_distribution(self, bins=10, figsize=(10, 5)):
        """Visualize distribution of leaves impurities.

        :param bins: int
            Number of bins of histograms
        :param figsize: tuple of int
            The figure size to be displayed
        """

        self._calculate_leaf_nodes()

        if figsize:
            plt.figure(figsize=figsize)
        plt.hist([self.impurity[i] for i in range(0, self.node_count) if self.is_leaf[i]], bins=bins)
        plt.xlabel("leaf impurity", fontsize=20)
        plt.ylabel("leaf count", fontsize=20)
Visualize distribution of leaves impurities.

        :param bins: int
            Number of bins of histograms
        :param figsize: tuple of int
            The figure size to be displayed
        
Visualize distribution of leaves impurities.
Visualize distribution of leaves impurities .
def show_leaf_impurity_distribution(self, bins=10, figsize=(10, 5)):
        self._calculate_leaf_nodes()
        if figsize:
            plt.figure(figsize=figsize)
        plt.hist([self.impurity[i] for i in range(0, self.node_count) if self.is_leaf[i]], bins=bins)
        plt.xlabel("leaf impurity", fontsize=20)
        plt.ylabel("leaf count", fontsize=20)
def show_leaf_impurity_distribution ( self , bins = 10 , figsize = ( 10 , 5 ) ) : self . _calculate_leaf_nodes ( ) if figsize : plt . figure ( figsize = figsize ) plt . hist ( [ self . impurity [ i ] for i in range ( 0 , self . node_count ) if self . is_leaf [ i ] ] , bins = bins ) plt . xlabel ( "leaf impurity" , fontsize = 20 ) plt . ylabel ( "leaf count" , fontsize = 20 )
Visualize distribution of leaves impurities.
Visualize distribution of leaves impurities .
"""Visualize distribution of leaves impurities.

        :param bins: int
            Number of bins of histograms
        :param figsize: tuple of int
            The figure size to be displayed
        """
self
bins
int
Number of bins of histograms
int Number of bins of histograms
figsize
tuple of int
The figure size to be displayed
tuple of int The figure size to be displayed