ThreadEmbedder

class convokit.hyperconvo.threadEmbedder.ThreadEmbedder(n_components: int = 7, method: str = 'svd', norm_method: str = 'standard', return_components: bool = False)

Transformer for embedding the thread statistics of a corpus in a low-dimensional space for visualization or other such purposes.

HyperConvo.fit_transform() must be run on the Corpus first

Parameters
  • n_components – Number of dimensions to embed threads into

  • method – Embedding method; “svd”, “tsne” or “none”

  • norm_method – Normalization method; “standard” or “none”

  • return_components – if True, returns the components from embedding

fit_transform(corpus: convokit.model.corpus.Corpus) → convokit.model.corpus.Corpus
Parameters

corpus – the Corpus to use

Returns

Modifies and returns corpus with new meta key: “threadEmbedder”, value: Dict, containing “X”: an array with rows corresponding to embedded threads, “roots”: an array whose ith entry is the thread root id of the ith row of X. If return_components is True, then the Dict contains a third key “components”: the SVD components array

transform(corpus: convokit.model.corpus.Corpus) → convokit.model.corpus.Corpus

Same as fit_transform()