Skip to content

samta/decision_tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Implementation for building decision trees

python implementation of id3 classification trees and [CART Classification And Regression Tree] (https://en.wikipedia.org/wiki/Decision_tree_learning) is a machine learning algorithm for building decision trees.

Run the code

Run the code with the python interpreter:

>> python3 id3.py ./resources/<config.cfg>

>> python3 cart.py ./resources/<config.cfg>

Where config.cfg is a plain text configuration file. The format of the config file is a python abstract syntax tree representing a dict with the following fields:

{ 'data_file' : './resources/tennis.csv', 'data_project_columns' : ['Outlook', 'Temperature', 'Humidity', 'Windy', 'PlayTennis'], 'target_attribute' : 'PlayTennis' }

You have to specify:

  • relative path to the data file
  • list of features set
  • the target attribute, that you want to predict.

Decision Tree

alt tag

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages