Skip to content

tree.export_text: add class_names argument to mirror plot_tree #20576

@gregglind

Description

@gregglind

Describe the workflow you want to enable

Decision trees should have similar / identical options for all export formats.

Describe your proposed solution

Include the class_names argument.

Describe alternatives you've considered, if relevant

Overhauling the whole tree plotting and export system, to make very nice output easy to achieve. Right now each format is dependent on force layouts, matplotlib engines, and varies a lot.

Additional context

https://scikit-learn.org/stable/auto_examples/tree/plot_iris_dtc.html <- shows a very nice graph.
https://stackoverflow.com/questions/25274673/is-it-possible-to-print-the-decision-tree-in-scikit-learn <- printing the decision tree layout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions