Giter Club home page Giter Club logo

id3-decison-tree's Introduction

ID3-Decision-Tree

ID3 is a simple decision learning algorithm developed ID3 constructs decision tree by employing a top-down, greedy search through the given sets of training data to test each attribute at every node. It uses statistical property call information gain to select which attribute to test at each node in the tree. Information gain measures how well a given attribute separates the training examples according to their target classification. Decision tree algorithms are a method for approximating discrete-valued target functions, in which the learned function is represented by a decision tree. These kinds of algorithms are famous in inductive learning and have been successfully applied to a broad range of tasks.

The Algorithm

The ID3 algorithm builds decision trees using a top-down, greedy approach. Briefly, the steps to the algorithm are:

  1. Start with a training data set, which we will call S. It should have attributes and classifications.

  2. Determine the best attribute in the data set S. How to pick the best attribute is explained next.

  3. Split S into subsets that correspond to the possible values of the best attribute.

  4. Make a decision tree node that contains the best attribute.

  5. Recursively make new decision tree nodes with the subsets of data created in step 3. Attributes cannot be reused. If a subset of data agrees on the classification, choose that. If there are no more attributes to split on, choose the most popular classification.

The ID3 algorithm for building a decision tree has been implemented on the famous Titanic Dataset. Clustering of input can be done if the attributes take continuous values to improve the accuracy.

Files and their functionality

File Description
data_preProcess.cpp Gets the input in the csv file to the required format
id3_general.cpp Implements the ID3 algorithm
Compare_accuracy.py Compares the performance of our ID3 implmentation with other contemporary classifiers
cluster.py Clusters the input

id3-decison-tree's People

Watchers

 avatar  avatar

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.