x-tabdeveloping / x-tabdeveloping/turftopic
seed_phrase is ignored
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 123
- Forks
- 9
- Avg merge
- 15h 59m
- Merged PRs (30d)
- 1
Description
I tried out using seeded topic modelling, using pre-embedded documents:
model = KeyNMF(10, top_n=15, encoder=trf, vectorizer=CountVectorizer(stop_words=stop_words, min_df=50, max_df=0.85), seed_phrase='bog teater literatur')
model.fit(cleaned_corpus, embeddings=embeddings_matrix)
However, this gave me the same results as when I left out the seed_phrase:
model = KeyNMF(10, top_n=15, encoder=trf, vectorizer=CountVectorizer(stop_words=stop_words, min_df=50, max_df=0.85))
model.fit(cleaned_corpus, embeddings=embeddings_matrix)
Is it possible that the seed_phrase gets overwritten as soon as embeddings is defined?
EDIT: when I leave out embeddings=embeddings_matrix, I do get a different result. (But I want to load my pre-embedded documents.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two KeyNMF calls in the issue, comparing seeded and unseeded runs both with and without the precomputed embeddings argument. Trace how KeyNMF handles seed_phrase when embeddings are supplied; done means seed_phrase changes the result on the pre-embedded path without breaking unseeded behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100