Body: <p>Let’s say I have a corpus of text and generate embeddings for it (I’m new to this, so not too particular as to what type of embeddings to use).</p>
  <p>I assume there is some function that can show me the top N tokens regarding cosin similarity for any chosen word / token W.</p>
  <p>I would like to use some (possibly recursive) graph algorithm which tries to convert a cluster of nodes with many edges into a binary branching tree.</p>
  <p>The result would be a binary-branching ontology for the concept - like a nested list subclassifying its aspects. Like</p>
  <ul>
  <li>tree</li>
  <li>what is it</li>
  <li>core properties</li>
  <li>important additional info</li>
  <li>…</li>
  </ul>
  <p>Or maybe a “prototype” graph of associations, like</p>
  <ul>
  <li>tree, pine, oak, wood, forest, furniture, carpentry…</li>
  </ul>
  <p>Any guidance on this would be appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-22T08:39:06.383Z
Comments.Text: To cluster an embedding space via binary branching, you can use hierarchical clustering algorithms. Hierarchical clustering is a technique that creates a tree-like structure of clusters by iteratively merging or splitting clusters based on a similarity metric. In your case, you can use the cosine similarity between embeddings as the similarity metric. - 
  
  The choice of embedding, similarity metric, and clustering algo will depend on your requirements and the nature of your text corpus. You may need to experiment with different approaches to find the best results for your use case.
Comments.UserDisplayName: Revolucion for Monica
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-22T18:41:49.573Z
Comments.Text: Thanks, maybe this R library can help create a “dendrogram”. https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/hclust
Comments.UserDisplayName: Julius Hamilton
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-22T18:46:33.597Z
Comments.Text: Sure, or have a look at [the question I asked years ago when I was doing my master thesis](https://es.stackoverflow.com/questions/191523/c%c3%b3mo-saber-qu%c3%a9-parte-de-una-lista-que-representa-un-%c3%a1rbol-est%c3%a1-contenida-o-simi)
Comments.UserDisplayName: Revolucion for Monica
Tags: <natural-language-processing>
Title: What ways are there to cluster an embedding space via binary branching?
UserDisplayName: Julius Hamilton
ThreadText: # What ways are there to cluster an embedding space via binary branching?
  
  (Asked by: username_0 on 2023-06-21)
  
  Let’s say I have a corpus of text and generate embeddings for it (I’m new to this, so not too particular as to what type of embeddings to use).
  
  I assume there is some function that can show me the top N tokens regarding cosin similarity for any chosen word / token W.
  
  I would like to use some (possibly recursive) graph algorithm which tries to convert a cluster of nodes with many edges into a binary branching tree.
  
  The result would be a binary-branching ontology for the concept - like a nested list subclassifying its aspects. Like
  
  * tree
  * what is it
  * core properties
  * important additional info
  * …
  
  Or maybe a “prototype” graph of associations, like
  
  * tree, pine, oak, wood, forest, furniture, carpentry…
  
  Any guidance on this would be appreciated.
  
  **Tags:** natural-language-processing
  
  > **Comments:**
  > **username_1**: To cluster an embedding space via binary branching, you can use hierarchical clustering algorithms. Hierarchical clustering is a technique that creates a tree-like structure of clusters by iteratively merging or splitting clusters based on a similarity metric. In your case, you can use the cosine similarity between embeddings as the similarity metric. -   The choice of embedding, similarity metric, and clustering algo will depend on your requirements and the nature of your text corpus. You may need to experiment with different approaches to find the best results for your use case.  
  > **username_0**: Thanks, maybe this R library can help create a “dendrogram”. https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/hclust  
  > **username_1**: Sure, or have a look at [the question I asked years ago when I was doing my master thesis](https://es.stackoverflow.com/questions/191523/c%c3%b3mo-saber-qu%c3%a9-parte-de-una-lista-que-representa-un-%c3%a1rbol-est%c3%a1-contenida-o-simi)  
  
  ---
  
  ## 0 answers
  
  