Skip to content

implements ID3 algorithm which would calculate the entropy and information gain and based on these values, the attributes are selected. These acquired information is used to create the decision tree. The entropy and hence the information gain is calculated using the training data. Pruning is carried out using the validation data.

Notifications You must be signed in to change notification settings

Mital188/Decision-Tree

Repository files navigation

This assignment is implemented using JAVA.

Project Structure:
------------------
Decision Tree ID3_program
    ---> Decision_tree.py
    ---> Tree_pruning.py
    ---> Main_program.py
    ---> data_sets1/test_set.csv
    ---> data_sets1/training_set.csv
    ---> data_sets1/validation_set.csv
    ---> data_sets2/test_set.csv
    ---> data_sets2/training_set.csv
    ---> data_sets2/validation_set.csv

To run the code, use the following command:
-------------------------------------------
--> javac Main_program.java
--> java Main_program <Lvalue><Kvalue><training set file> <validation set file> <Test set file> <"yes" or "no">
Example:
--------
  javac Main_program.java
  java Main_program.java 20 5 “training_set.csv” “validation_set.csv” “test_set.csv” “yes” 

 

About

implements ID3 algorithm which would calculate the entropy and information gain and based on these values, the attributes are selected. These acquired information is used to create the decision tree. The entropy and hence the information gain is calculated using the training data. Pruning is carried out using the validation data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages