CommunityEmbedder¶
-
class
convokit.hyperconvo.communityEmbedder.
CommunityEmbedder
(community_key: Optional[str] = None, n_components: int = 2, method: str = 'none')¶ Must be run after threadEmbedder.fit_transform()
Groups threads together into communities in this space for visualization or other such purposes.
- Parameters
community_key – Key in “meta” dictionary of each utterance whose corresponding value we’ll use as the community label for that utterance (see threadEmbedder)
n_components – Number of dimensions to embed communities into
method – Embedding method; “svd”, “tsne” or “none”
-
fit_transform
(corpus: convokit.model.corpus.Corpus) → convokit.model.corpus.Corpus¶ Groups threads together into communities.
- Parameters
corpus – the Corpus to use
- Returns
Modifies and returns Corpus with new meta key: “communityEmbedder”, value: Dict, containing “pts”: an array with rows corresponding to embedded communities, and “labels”: an array whose ith entry is the community of the ith row of X.
-
transform
(corpus: convokit.model.corpus.Corpus) → convokit.model.corpus.Corpus¶ Same as fit_transform()