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

Strange output for TopTokensCoherenceScore #1016

Open
DrozdikGleb opened this issue Jul 22, 2020 · 1 comment
Open

Strange output for TopTokensCoherenceScore #1016

DrozdikGleb opened this issue Jul 22, 2020 · 1 comment

Comments

@DrozdikGleb
Copy link

DrozdikGleb commented Jul 22, 2020

I've created 18 topics for my model and used TopTokensCoherenceScore. When I call artm_model.score_tracker['TopTokensCoherenceScore'].average_coherence it gives me correct result for each collection pass, but when I call artm_model.score_tracker['TopTokensCoherenceScore'].coherence (or coherence[-1] for last collection pass) it gives me output in following format:

{'topic_1': [1.1617621183395386,
  1.1602195501327515,
  0.3456096351146698,
  0.9662702679634094,
  0.5320848226547241],
 'topic_2': [0.9413328170776367,
  0.3860290050506592,
  1.2057011127471924,
  1.1175670623779297,
  0.37220320105552673],
 'topic_3': [0.28798189759254456,
  1.1940522193908691,
  0.6581138372421265,
  0.42109599709510803,
  1.9474769830703735],
 'topic_4': [0.5959908366203308, 0.7645043134689331, 0.22957539558410645]}

I suppose correct format should be looks like this

{'topic_1': 1.1617621183395386,
 'topic_2':1.1602195501327515,
 'topic_3':0.3456096351146698,
 'topic_4':0.9662702679634094,
 'topic_5':0.5320848226547241,
 ...
 'topic_18':0.22957539558410645
 }

P.S. bigartm version - 0.10.1

@JeanPaulShapo
Copy link
Contributor

Sorry for late response.
It seems that there was incorrect use of topic_name field for labeling coherence scores
Right now bugfix for this is merged into master (see #1019 )
Could you please check that library built from current master branch fixes format?

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

2 participants