Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entropy error #1

Open
ghost opened this issue Nov 23, 2012 · 0 comments
Open

entropy error #1

ghost opened this issue Nov 23, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 23, 2012

There is an error in the entropy calculation so the tree generated is wrong by the ID3 code.
I modify the loop at row 38 of DecisionTree.py in this way
i = 0
for entry in attributes:
if (targetAttr != entry):
i+=1
else:
break
if you modify that there is another bug on the ChooseAttrib function, it will select the highest gain value attrib, that is the target, just remove the target from the list of the attributes.
Nice code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants