This commit is contained in:
mhjensen
2019-10-31 06:51:29 +01:00
parent 415fcf3f0c
commit 9fc81885cb
46 changed files with 4629 additions and 4952 deletions
+3 -7
View File
@@ -35,13 +35,8 @@ given some assumptions, make predictions about the target feature value
!split
===== A typical Decision Tree with its pertinent Jargon, Classification Problem =====
In the figure here we present a decision tree obtained from a classification problem
!split
===== A typical Decision Tree with its pertinent Jargon, Regeression Problem =====
In the figure we present a decision tree obtained from a simple regression problem
!split
@@ -665,12 +660,13 @@ attributes at each step while growing the tree.
!split
===== Implementing the ID3 Algorithm =====
!bc pycod
import re
import math
from collections import deque
# x is examples in training set
# y is set of attributes
# y is set of targets
# label is target attributes
# Node is a class which has properties values, childs, and next
# root is top node in the decision tree
@@ -852,7 +848,7 @@ def test():
if __name__ == '__main__':
test()
!ec
!split
===== Cancer Data again now with Decision Trees and other Methods =====