A simple implementation of decision tree

This is a simple implementation of decision tree using Python.

How to use it

  • problem2 contains the functions to read data from CSV file and the basic functions to build a decision tree.
  • problem3 contains the function to build a dections tree given a training dataset.
  • problem4 contains the functions to classify a data set of test records based on pre-trained tree and calculate the tree's error.
  • problem5 is an example of training decision tree and testing decision tree.

Requirement

  • numpy
  • csv
  • pydot

Authors

  • Yuxin Cui