Skip to content

Update attribute.py #5

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

Merged
merged 1 commit into from
Feb 5, 2018
Merged

Update attribute.py #5

merged 1 commit into from
Feb 5, 2018

Conversation

netklause
Copy link
Contributor

I added this code just in case that there is a new value of nominal attribute coming up to update_classfier(). Apart from the stage of building classifier, while new instances with new value of nominal attribute are streaming into the classifier, this new value is neither known nor indexed in the set of attribute's value yet.

As far as I have experimented on my model before adding this contribution, it is necessary to probe all possible values of nominal attributes once and for all in build_classifier(), which I think that this might not possible for some kind of applications where new values are continuously appeared, say network traffic.

I am not sure if this adding would defy the semantic of Hoeffding Tree or not. But without this, ValueError shall be raised and hence unavoidably inhabit the training progress since 'class Attribute' is not able to index unknown attribute's value.

PS, anyway, thank you so much for explaining me in our recent mail discussion.

@vitords vitords merged commit 60b859b into vitords:master Feb 5, 2018
@vitords
Copy link
Owner

vitords commented Feb 5, 2018

This is indeed a useful feature to be included and, as far as I know, has no conflicts with the definition of a Hoeffding Tree.

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants