Giter VIP home page Giter VIP logo

fuzzydecisiontree's Introduction

Decision Tree Program

Python3 implementation of ID3 algorithm based on categorical datasets.

Sample Decision Tree

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
  • 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).

fuzzydecisiontree's People

Contributors

akshay326 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

almakonde hadryan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.