Skip to main content

📚🔍🎨 Decision Tree Visualizer

Introduction

The Decision Tree Visualizer is a powerful library that allows you to visualize sklearn Decision Tree Classifiers with ease. It provides functions for extracting useful information about the tree structure and rules, and generates HTML files for visualizing the decision tree.

📊 Features

  • 🌳 Visualize sklearn Decision Tree Classifiers using HTML templates
  • 🔍 Extract useful information about the tree structure and rules
  • 📊 Generate output HTML files for visualization
  • 🎨 Customize target names and colors for better visualization

🔧 Installation

To install the library, use pip:

pip install d-treevis

📖 Usage

To get started, import the library and use the create_tree and create_sankey functions:

import d_treevis as dtv

Next, fit a sklearn Decision Tree Classifier on your dataset and pass it to the create_tree function:

from sklearn.tree import DecisionTreeClassifier
    
# Fit a Decision Tree Classifier on your dataset
tree_model = DecisionTreeClassifier()
tree_model.fit(X, y)

# Visualize the decision tree
visualizer.visualize(tree_model)

You can also customize the target names and colors for better visualization:

# Define target names and colors
target_names = ['Survived', 'Not Survived']
target_colors = ['red', 'yellow']

# Visualize the decision tree with custom target names and colors
visualizer.visualize(tree_model, target_names=target_names, target_colors=target_colors)

📚 Documentation

For detailed documentation and examples, please refer to the Decision Tree Visualizer Documentation.

📄 License

This library is licensed under the MIT License.

🙌 Contributing

Contributions are welcome! Please read the Contribution Guidelines before submitting a pull request.

📧 Contact

If you have any questions or suggestions, feel free to reach out to us at support@example.com.

🔖 References

Metadata

Release files for decision-tree-visualizer 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decision-tree-visualizer 1.0.0
File Size Uploaded Provenance Actions
decision_tree_visualizer-1.0.0.tar.gz 9.0 kB Without provenance Details for decision_tree_visualizer-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for decision-tree-visualizer 1.0.0
File Interpreter ABI Platform Actions
decision_tree_visualizer-1.0.0-py3-none-any.whl Python 3 none any Details for decision_tree_visualizer-1.0.0-py3-none-any.whl

Total release size: 18.2 kB

Release files / decision_tree_visualizer-1.0.0.tar.gz

Download URL decision_tree_visualizer-1.0.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4fdfa5201b7f2b51ad2d19062f90dae7cef47042c969cbe1f3284062748b075d
BLAKE2b-256 checksum
How to use checksums
5c790bf161f92bd642cbe129517e911906dc3bf2c49b3da9be718c41b77fb6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / decision_tree_visualizer-1.0.0-py3-none-any.whl

Download URL decision_tree_visualizer-1.0.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e8c24a03b021e1a3714283795084c52db1df9abe5c33d65ee3bf4cc170a5356
BLAKE2b-256 checksum
How to use checksums
6c1822b5bb733f0e410da157741b6542748f06662eed9d992df671dde71c55c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for decision-tree-visualizer 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page