Skip to content

Fix bug when converting OSDT leaves into a Text Classifier compatible… #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FernandoLpz
Copy link

There is a bug when trying to validate if a leaf exists in the features dict. Essentially, a leaf is a tuple with form:

(feature_1, feature_2, ..., feature_n)

and the keys and values of the features dict has the form:

key = feature
value = frequency

where

feature: int
frequency: int

So the original if-else statement, tried to validate if a tuple was in features, however features only contain integers for key and values. For some specific cases, it returned an empty dict which turn out into a recursivity problem.

achreto referenced this pull request in ubc-systopia/gosdt-guesses Feb 25, 2022
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.

1 participant