Retrieve embeddings for selected documents (and re-cluster) #1825
morrisseyj
started this conversation in
General
Replies: 2 comments 5 replies
-
All underlying embedding models have the |
Beta Was this translation helpful? Give feedback.
4 replies
-
In the end, i think i just did the laborious way described above - rather than writing a function as i didn't have to do it very many times. The function should be straightforward, however, based on the code provided. Something like this - note i haven't tested this:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am interested in selecting a subset of topics (or more likely a single topic) and then re-running the clustering process on those embeddings. To this end, I am trying to identify a function/method that will extract the embeddings for each doc. This way I could build an additional model on this subset of embeddings. I can't however seem to find this.
I can achieve this result as follows:
This is manageable, but i was wondering if there wasn't a function i was missing that did something like:
topic_model.get_document_embeddings(docs)
that returned a dataframe of topics and embeddings. That or a method to pull the embedding from each doc.If not, i can, of course, write a function for this.
Beta Was this translation helpful? Give feedback.
All reactions