Metadata-Version: 2.4
Name: decision-tree-visualizer
Version: 1.0.0
Summary: A library to visualize sklearn Decision Tree Classifiers.
Author: yashksaini-coder
Author-email: ys3853428@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0.0
Requires-Dist: matplotlib>=3.9.0
Requires-Dist: Jinja2>=3.1.4
Requires-Dist: scikit-learn>=1.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 📚🔍🎨 **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:

```python
import d_treevis as dtv
``` 

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

```python
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:

```python
# 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](https://example.com/documentation).

## 📄 **License**
This library is licensed under the [MIT License](https://example.com/license).

## 🙌 **Contributing**
Contributions are welcome! Please read the [Contribution Guidelines](https://example.com/contributing) before submitting a pull request.

## 📧 **Contact**
If you have any questions or suggestions, feel free to reach out to us at [support@example.com](mailto:support@example.com).

## 🔖 **References**
- [sklearn Decision Tree Classifier](https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html)
