Skip to content
New issue

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

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

Already on GitHub? # to your account

major LDAviz UI topic index bug (e.g. term, topic, etc.) #265

Closed
ed9w2in6 opened this issue Apr 17, 2024 · 1 comment · Fixed by #266
Closed

major LDAviz UI topic index bug (e.g. term, topic, etc.) #265

ed9w2in6 opened this issue Apr 17, 2024 · 1 comment · Fixed by #266
Assignees

Comments

@ed9w2in6
Copy link
Contributor

ed9w2in6 commented Apr 17, 2024

I believe this is a high impact bug as it is not easy to notice, and can lead to incorrect interpretation, especially item 5.


Steps to reproduce

As of pyldavis==3.4.1, the bug should manifest itself as a minor UI bug (item 2,3), and data inconsistency (item 5).
It can be reproduced as follow:

  1. prepare a visualisation with start_index=0
  2. click topic 0
  3. hover other topic and observe that topic will never be set to color1 (~blue) again, stuck at color2 (~red)
  4. clicking other topic and observe same behaviour
  5. hover a term and observer radius of topic does not agree with data, in fact, they are off by 1.

Blame

This commit: 010cde0#diff-12750ebcae02c096cb6939beb54d0ab2353800555b8c01b00fae4fe93f376cfd

reverted some changes that are necessary for non-zero indexing to be functional:
f1cdb65#diff-ce28a7d983569ace041957292840319d65e2c6352989ae5f5556ae555e89404d


Solutions

The quickest and simplest fix is by reverting changes to all start_index related logic.

However, in the long run, we should probably decouple indexing logic with Topic labels, which will then allow renaming topics, which is sometimes requested by users.

@ed9w2in6
Copy link
Contributor Author

To mitigate the issue, set start_index=1.

ed9w2in6 added a commit to ed9w2in6/pyLDAvis that referenced this issue Apr 17, 2024
@msusol msusol self-assigned this Apr 24, 2024
msusol added a commit that referenced this issue Apr 29, 2024
fix: #265 and #261 (`/js/ldavis.v3.0.0.js`)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants