Skip to content

alireza0r/DecisionTree_From_Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decision Tree with ID3 algorithm

Folders


Create_dataset:

  • In this folder you can make a .csv file of .discrete files
  • There is a Adult dataset in this folder and you can use of this dataset
  • for create .csv files of .discrete files you should run create_dataset.py
  • after run create_dataset.py, program get .discrete file name
  • Attention: The .discrete file must have the following labels:
  • Labels: dataset_headernames = ['label', 'workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country']
  • After run, create two train_dataset.csv and validation_dataset.csv

Create_dataset



Create_tree:

  • In this folder you can make a tree with ID3 algorithm
  • You should run ID3_withCheackLabel_csvDataset_v0.24.py
  • After run, you have to give a train dataset (.csv), for example you can use Create_dataset/train_dataset.csv or train_dataset.csv.
  • After train, The model make a tree_law.csv that show the tree law also make a train_full_information.txt that show a info dictionary of the dataset.

Create_tree



Test_Tree:

  • you can use of this folder for test the Tree.

Test_Tree





Thank you in advance for improving this app
AR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages