treeplot

Plot tree based machine learning models

https://github.com/erdogant/treeplot

Science Score: 54.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
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary

Keywords

gradient-boosting machine-learning plot pypi python randomforest tree-structure treeplot xgboost
Last synced: 4 months ago · JSON representation ·

Repository

Plot tree based machine learning models

Basic Info
Statistics
  • Stars: 12
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 20
Topics
gradient-boosting machine-learning plot pypi python randomforest tree-structure treeplot xgboost
Created almost 6 years ago · Last pushed about 1 year ago
Metadata Files
Readme Funding License Citation

README.md

treeplot - Plot tree based machine learning models.

Python PyPI Version License Downloads Downloads BuyMeCoffee Sphinx <!---Coffee-->

  • 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.

Functions in treeplot

Treeplot can plot the tree for Random-forest, decission 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. Parameters can be specified. * .xgboost : Plot the xgboost model. Parameters can be specified. * .import_example('iris') : Import example dataset

⭐️ Star this repo if you like it ⭐️

Install treeplot from PyPI

bash pip install treeplot

Import treeplot package

python import treeplot as tree

Documentation pages

On the documentation pages you can find detailed information about the working of the treeplot with examples.


Examples



Maintainers

Contribute

  • Contributions are welcome.
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

Owner

  • Name: Erdogan
  • Login: erdogant
  • Kind: user
  • Location: Den Haag

Machine Learning | Statistics | Bayesian | D3js | Visualizations

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Taskesen
    given-names: Erdogan
    orcid: "https://orcid.org/0000-0002-3430-9618"
cff-version: "1.1.0"
date-released: 2020-10-07
keywords: 
  - "python"
  - "xgboost"
  - "tree-structure"
  - "treeplot"
  - "randomforest"
  - "randomforest"
  - "gradient-boosting"
license: "MIT"
message: "If you use this software, please cite it using these metadata."
repository-code: "erdogant.github.io/treeplot"
title: "Plot XGboost and Randomforest Tree"
version: "0.1.0"
...

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 103
  • Total Committers: 3
  • Avg Commits per committer: 34.333
  • Development Distribution Score (DDS): 0.039
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
erdogant e****t@g****m 99
taskesene e****n@r****l 3
LIng C****7@s****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 20 hours
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • chongfengling (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,369 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 3
  • Total versions: 18
  • Total maintainers: 1
pypi.org: treeplot

Python package treeplot vizualizes a tree based on a randomforest or xgboost model.

  • Versions: 18
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 1,369 Last month
Rankings
Dependent packages count: 4.7%
Average: 7.0%
Downloads: 7.4%
Dependent repos count: 9.0%
Maintainers (1)
Last synced: 4 months ago

Dependencies

docs/source/requirements.txt pypi
  • pipinstallsphinx_rtd_theme *
requirements-dev.txt pypi
  • irelease * development
  • nbconvert * development
  • numpy * development
  • pytest * development
  • rst2pdf * development
  • sphinx * development
  • sphinx_rtd_theme * development
  • sphinxcontrib-fulltoc * development
setup.py pypi
  • funcsigs *
  • graphviz >=0.20.1
  • matplotlib *
  • numpy *
  • sklearn *
  • wget *