An open API service indexing awesome lists of open source software.

https://github.com/rachhshruti/classification-tree-greedy-algorithm

Greedy algorithm for classification tree
https://github.com/rachhshruti/classification-tree-greedy-algorithm

classification-trees gini greedy-algorithm information-gain python

Last synced: 3 months ago
JSON representation

Greedy algorithm for classification tree

Awesome Lists containing this project

README

        

# Greedy Algorithm for Classification Tree

Implemented a greedy algorithm for building classification tree given a data set. It uses gini or information gain as a spliting criteria to decide the best attribute based on the user input.
The algorithm gives an average accuracy of 0.95 which was evaluated by performing 10 fold cross validation on 10 different data sets.

# Running the code:

python ClassficationTree.py "dataset" "," "gini"

The code accepts the following command line arguments:

1. The path of the dataset file
2. The delimiter used in the file to separate attributes
3. A string either "gini" or "info" for deciding the best spliting attribute.