https://github.com/akshay326/fuzzydecisiontree
https://github.com/akshay326/fuzzydecisiontree
decisiontree fuzzy-logic id3 python3
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akshay326/fuzzydecisiontree
- Owner: akshay326
- Created: 2019-04-25T17:04:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-25T17:11:29.000Z (over 6 years ago)
- Last Synced: 2025-03-29T04:42:04.579Z (6 months ago)
- Topics: decisiontree, fuzzy-logic, id3, python3
- Language: Python
- Size: 16.6 KB
- Stars: 7
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Decision Tree Program
**Python3** implementation of ID3 algorithm based on categorical datasets.
## Features
+ The tree is created using ``DecisionTree.py`` file.
+ Its implementation of **ID3 algorithm** and returns the resulting tree as a multi-dimensional dictionary.
+ Works on **categorical datasets only**.
+ Unpredictable outputs are denoted by **?**
+ Added ``DrawTree.py`` to generate decision tree **png image** using ``pyDot`` library## Installation
+ Open the terminal or command prompt. Head for the directory with source code
+ *PyDot* package is based on *GraphViz*. Get the instructions to install it [here](https://emden.github.io/download/)
+ Install python requirements:
```
pip install -r requirements.txt
```## Sample Output
Output of Test Cases:**Weather.csv**
| Entry | Output |
-------|------
entry1 | no
entry2 | no
entry3 | yes
entry4 | yes
entry5 | no**Vote.csv**
| Entry | Output |
-------|------
entry1 | democrat
entry2 | democrat
entry3 | republican
entry4 | democrat
entry5 | democrat**Soybean.csv**
| Entry | Output |
-------|------
entry1 | ?
entry2 | frog-eye-leaf-spot
entry3 | frog-eye-leaf-spot
entry4 | brown-spot
entry5 | ?## Contributing
Feel free to leave any comments (as issues) or make suggestions (as a pull request).