Skip to content

This project realized in python is about learning from decision trees, using a simple pruning technique.

Notifications You must be signed in to change notification settings

Tommaso23/DecisionTree

Repository files navigation

DecisionTree

This project is about learning from decision tree, using a simple pruning technique.

How to use:

Use all the files in the repository and run the main.py. Uncomment the code releated to the dataset you want to test.

Repository Overview:

The repository has 6 files:

  • dataset.py: class to represent a given dataset
  • decisiontree.py: class to represent the decision tree
  • decisionleaf.py: class to define a leaf of the decision tree
  • decisiontreelearner.py: this file include the function to create the decision tree and to use the pruning technique
  • test.py: this file contains all the functions used to create the dataset from a file that contains dataset and to test the results
  • main.py: file to make tests and generate plot

Dataset:

You can download the 3 datasets used from the following links:

Requirements:

All the code is written in python 3

Dependencies

  • math
  • copy
  • deepcopy
  • datetime
  • random
  • matplotlib
  • pyplot

References:

The organization of some class and part of the code is taken from : https://github.com/aimacode/aima-python

About

This project realized in python is about learning from decision trees, using a simple pruning technique.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages