treeplot’s documentation!

|Python |Python Version Sphinx documentation Stars lines of code Downloads per month Downloads in total License Github Forks Open Issues Project Status Colab example repo-size donate

Example treeplot.

figd

treeplot is Python package to easily plot the tree derived from models such as decisiontrees, randomforest and xgboost. Developing explainable machine learning models is becoming more important in many domains. The most popular and classical explainable models are still tree based. Think of decision trees or random forest. The tree that is learned can be visualized and then explained. However, it can be a challange to simply plot the tree. Think of configuration issues with dot files, path locations to graphviz, differences across operating systems, differences across editors such as jupyter notebook, colab, spyder etc. This frustration led to this library, an easy way to plot the decision trees 🌲. It works for Random-forest, decission trees, xgboost and gradient boosting models. Under the hood it makes many checks, downloads graphviz, sets the path and then plots the tree.


Treeplot can be used for: Random-forest, Decision trees, XGboost and Gradient boosting models:

  • .plot : Generic function to plot the tree of any of the four models with default settings

  • .randomforest : Plot the randomforest model.

  • .xgboost : Plot the xgboost model.

  • .LightBM : Plot the LightBM model.


Note

Your ❤️ is important to keep maintaining this package. You can support in various ways, have a look at the sponser page. Report bugs, issues and feature extensions at github page.

pip install treeplot

Content

Installation

Tutorials

Indices and tables