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

Artm 0.10.0: transform with predict_class_ids returns empty df #983

Open
bt2901 opened this issue Sep 11, 2019 · 1 comment
Open

Artm 0.10.0: transform with predict_class_ids returns empty df #983

bt2901 opened this issue Sep 11, 2019 · 1 comment

Comments

@bt2901
Copy link
Contributor

bt2901 commented Sep 11, 2019

No description provided.

@mathemare
Copy link

Hello,

Seems like the last major version changed a lot of core functionality (for instance the way class_ids are used, I don't remember to have seen it in the index of Phi matrix in previous versions, maybe this regression is an impact)

Just to add an easily reproducible procedure to this issue:

> import os, artm, time
> os.system('echo "DOC1 |@default_class tok1:1 tok2:5 |@lab lab1\nDOC2 |@default_class tok1:2 tok3:1 |@lab lab2\nDOC3 |@default_class tok2:2 |@lab lab1" > \~/test')
> batch_vectorizer = artm.BatchVectorizer(data_path="\~/test", data_format='vowpal_wabbit', target_folder='kos'+str(time.time()))
> model_artm = artm.ARTM(num_topics=2, dictionary=batch_vectorizer.dictionary, class_ids={'@default_class': 1.0, '@lab': 2.0})
> model_artm.fit_offline(batch_vectorizer=batch_vectorizer)
> model_artm.transform(batch_vectorizer, predict_class_id="@lab")
> print(model_artm.transform(batch_vectorizer, predict_class_id="@lab"))
Empty DataFrame
Columns: [0, 1, 2]
Index: []

Thank you for this incredible project !
Matthieu

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