pyreal.visualize.plot_tree_explanation#

pyreal.visualize.plot_tree_explanation(dte, transparent=False, class_names=None, label='all', filled=True, rounded=True, impurity=False, proportion=False, precision=3, fontsize=10, filename=None)[source]#

Plot the decision tree given the decision tree explainer

Parameters:
  • dte – Decision tree explainer.

  • transparent (Boolean) – Determines if the output figure is transparent or not.

  • class_names (list of str) – Names of each of the target classes in ascending numerical order.

  • label ('all', 'root', or 'none') – Options include ‘all’ to show at every node, ‘root’ to show only at the top root node, or ‘none’ to not show at any node.

  • filled (Boolean) – If set to True, paint the nodes based on the majority class of the node.

  • rounded (Boolean) – If set to True, the box representing each node will have rounded corners.

  • impurity (Boolean) – If set to True, show the impurity at each node.

  • proportion (Boolean) – If set to True, change the display of ‘values’ and/or ‘samples’ to be proportions and percentages respectively.

  • precision (int) – Number of digits of precision for floating point numbers.

  • filename (string or None) – If not None, save the figure as filename.