/decision-tree

some practice for decision tree

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

decision-tree

some practice for decision tree

  • the tree.py can be used in other applications.
  • train.txt include the training data.
  • training file:
    • the first line should be the list of attributes that do not include the target attribute.
    • the second line should be the target attribute.
    • from third line, there is no empty line in this file.
    • put the training data in order above.
  • cross_chain file:
    • the first line is the list of attributes that do not include the target attribute.
    • the string in the "()" is the real correct class name.
  • the theory of this code is from the chapter 3 of Machine learning written by Tom M.Mitchell.