Retrieve embeddings for selected documents (and re-cluster) #1825
Replies: 3 comments 6 replies
-
All underlying embedding models have the |
Beta Was this translation helpful? Give feedback.
-
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.
-
I might be miss something, but since we defined
why cannot we just use |
Beta Was this translation helpful? Give feedback.
-
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