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

Modalities are ignored when calculating token_value in dictionary #1034

Open
bt2901 opened this issue Nov 8, 2020 · 0 comments
Open

Modalities are ignored when calculating token_value in dictionary #1034

bt2901 opened this issue Nov 8, 2020 · 0 comments

Comments

@bt2901
Copy link
Contributor

bt2901 commented Nov 8, 2020

Suppose I have three modalities: words, n-grams, titles. The sum of everything in Phi matrix will be equal to 3.0 (each modality sums to ≈1.0).

However, the behaviour of dictionary frequencies is not equal in that regard:

>>> df = artm_dict.save_dataframe()
>>> df.token_value.sum()
1.0000000048381423

>>> df.query("class_id == '@lemmatized'").token_value.sum()
0.8612454659903541

>>> df.query("class_id == '@ngramms'").token_value.sum()
0.11752337550095149

>>> df.query("class_id == '@page_title'").token_value.sum()
0.0005244806132083113

Altering existing dictionary with artm_dict.filter(**kwargs, recalculate_value=True) appear to preserve this behaviour.

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

1 participant