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
- Host: GitHub
- URL: https://github.com/rachhshruti/classification-tree-greedy-algorithm
- Owner: rachhshruti
- Created: 2017-12-03T04:25:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-03T04:35:31.000Z (over 7 years ago)
- Last Synced: 2025-02-05T11:44:34.521Z (4 months ago)
- Topics: classification-trees, gini, greedy-algorithm, information-gain, python
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.