Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decision_tree_visualizer-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decision_tree_visualizer-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file decision_tree_visualizer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for decision_tree_visualizer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4fdfa5201b7f2b51ad2d19062f90dae7cef47042c969cbe1f3284062748b075d
MD5 c752ea2ee5ea3789406b362c71187dd1
BLAKE2b-256 5c790bf161f92bd642cbe129517e911906dc3bf2c49b3da9be718c41b77fb6b2

See more details on using hashes here.

File details

Details for the file decision_tree_visualizer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for decision_tree_visualizer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e8c24a03b021e1a3714283795084c52db1df9abe5c33d65ee3bf4cc170a5356
MD5 f0c41e940e647028264e6e5b5622a63f
BLAKE2b-256 6c1822b5bb733f0e410da157741b6542748f06662eed9d992df671dde71c55c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page