A library to visualize sklearn Decision Tree Classifiers.
Project description
📚🔍🎨 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decision_tree_visualizer-1.0.0.tar.gz.
File metadata
- Download URL: decision_tree_visualizer-1.0.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fdfa5201b7f2b51ad2d19062f90dae7cef47042c969cbe1f3284062748b075d
|
|
| MD5 |
c752ea2ee5ea3789406b362c71187dd1
|
|
| BLAKE2b-256 |
5c790bf161f92bd642cbe129517e911906dc3bf2c49b3da9be718c41b77fb6b2
|
File details
Details for the file decision_tree_visualizer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: decision_tree_visualizer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e8c24a03b021e1a3714283795084c52db1df9abe5c33d65ee3bf4cc170a5356
|
|
| MD5 |
f0c41e940e647028264e6e5b5622a63f
|
|
| BLAKE2b-256 |
6c1822b5bb733f0e410da157741b6542748f06662eed9d992df671dde71c55c9
|