sklearn.tree#

Decision tree based models for classification and regression.

User guide. See the Decision Trees section for further details.

DecisionTreeClassifier

A decision tree classifier.

DecisionTreeRegressor

A decision tree regressor.

ExtraTreeClassifier

An extremely randomized tree classifier.

ExtraTreeRegressor

An extremely randomized tree regressor.

Exporting#

export_graphviz

Export a decision tree in DOT format.

export_text

Build a text report showing the rules of a decision tree.

Plotting#

plot_tree

Plot a decision tree.