Science Score: 31.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Keywords
Repository
Visualize decision trees in Python
Basic Info
- Host: GitHub
- Owner: mljar
- License: agpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://mljar.com/supertree
- Size: 38 MB
Statistics
- Stars: 499
- Watchers: 6
- Forks: 17
- Open Issues: 3
- Releases: 10
Topics
Metadata Files
README.md

supertree - Interactive Decision Tree Visualization
supertree is a Python package designed to visualize decision trees in an interactive and user-friendly way within Jupyter Notebooks, Jupyter Lab, Google Colab, and any other notebooks that support HTML rendering. With this tool, you can not only display decision trees, but also interact with them directly within your notebook environment. Key features include:
- ability to zoom and pan through large trees,
- collapse and expand selected nodes,
- explore the structure of the tree in an intuitive and visually appealing manner.
Examples
Decision Tree classifier on iris data
```python from sklearn.tree import DecisionTreeClassifier from sklearn.datasets import load_iris from supertree import SuperTree # <- import supertree :)
Load the iris dataset
iris = load_iris() X, y = iris.data, iris.target
Train model
model = DecisionTreeClassifier() model.fit(X, y)
Initialize supertree
supertree = SuperTree(model, X, y, iris.featurenames, iris.target_names)
show tree in your notebook
supertree.showtree() ```

Random Forest Regressor Example
```python from sklearn.ensemble import RandomForestRegressor from sklearn.datasets import load_diabetes from supertree import SuperTree # <- import supertree :)
Load the diabetes dataset
diabetes = load_diabetes() X = diabetes.data y = diabetes.target
Train model
model = RandomForestRegressor(nestimators=100, maxdepth=3, random_state=42) model.fit(X, y)
Initialize supertree
super_tree = SuperTree(model,X, y)
show tree with index 2 in your notebook
supertree.showtree(2) ```

There are more code snippets in the examples directory.
Instalation
You can install SuperTree package using pip:
pip install supertree
Conda support coming soon.
Supported Libraries
- scikit-learn (
sklearn) - LightGBM
- XGBoost
- ONNX:
Supported Algorithms
The package is compatible with a wide range of classifiers and regressors from these libraries, specifically:
Scikit-learn
DecisionTreeClassifierExtraTreeClassifierExtraTreesClassifierRandomForestClassifierGradientBoostingClassifierHistGradientBoostingClassifierDecisionTreeRegressorExtraTreeRegressorExtraTreesRegressorRandomForestRegressorGradientBoostingRegressorHistGradientBoostingRegressor
LightGBM
LGBMClassifierLGBMRegressorBooster
XGBoost
XGBClassifierXGBRFClassifierXGBRegressorXGBRFRegressorBooster
If we do not support the model you want to use, please let us know.
Features
Check this features in example directory :)
Articles
- Visualize decision tree from scikit-learn package
- 4 ways to vizualize decision tree from LightGBM
- How to visualize decision tree from Xgboost
Support
If you encounter any issues, find a bug, or have a feature request, we would love to hear from you! Please don't hesitate to reach out to us at supertree/issues. We are committed to improving this package and appreciate any feedback or suggestions you may have.
License
supertree is a commercial software with two licenses available:
- AGPL-3.0 license
- Commercial license with support and maintenance included. Pricing website https://mljar.com/supertree/ License supertree-commercial-license.pdf.
Owner
- Name: MLJAR
- Login: mljar
- Kind: organization
- Email: contact@mljar.com
- Location: Poland
- Website: https://mljar.com
- Twitter: MLJARofficial
- Repositories: 30
- Profile: https://github.com/mljar
Outstanding Data Science Tools
Citation (CITATION)
@misc{supertree,
author = {Tomasz Marchela and Piotr P\l{}o\'{n}ski},
year = {2024},
publisher = {MLJAR Sp. z o.o.},
address = {\L{}apy, Poland},
title = {supertree: interactive visualization of decision trees. Version 0.3.0},
url = {https://github.com/mljar/supertree}
}
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 18
- Watch event: 114
- Issue comment event: 26
- Push event: 9
- Fork event: 11
Last Year
- Create event: 1
- Release event: 1
- Issues event: 18
- Watch event: 114
- Issue comment event: 26
- Push event: 9
- Fork event: 11
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 30
- Total pull requests: 0
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Total issue authors: 12
- Total pull request authors: 0
- Average comments per issue: 1.3
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 23
- Pull requests: 0
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Issue authors: 10
- Pull request authors: 0
- Average comments per issue: 1.35
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pplonski (18)
- ogencoglu (2)
- KulikDM (2)
- jmozmoz (2)
- P-Y-R-O-B-O-T (1)
- TheNeeloy (1)
- msicilia (1)
- eleanor-clifford (1)
- juandaherrera (1)
- SalvatoreRa (1)
- Kirvyteo (1)
- Thornam (1)
- fzyzcjy (1)
- micha-hro (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 863 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 27
- Total maintainers: 1
pypi.org: supertree
Visualize decision tree in Python
- Homepage: https://github.com/mljar/supertree
- Documentation: https://supertree.readthedocs.io/
- License: LICENSE.txt
-
Latest release: 0.5.5
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- ipython *
- numpy *
- pandas *









