multimodal_fin.embeddings.visualizer package

Submodules

multimodal_fin.embeddings.visualizer.conference_tree_visualizer module

class multimodal_fin.embeddings.visualizer.conference_tree_visualizer.ConferenceTreeVisualizer(root)[source]

Bases: object

Visualizes the hierarchical structure of a conference tree built with ConferenceNode objects.

Supports both textual and graphical representations using anytree and networkx.

show_networkx_tree(label_angle=30)[source]

Displays the conference tree using NetworkX and Matplotlib.

Parameters:

label_angle (int) – Angle (in degrees) to rotate node labels. Default is 30.

show_text_tree()[source]

Prints the structure of the conference tree as a plain-text hierarchy.

multimodal_fin.embeddings.visualizer.node_embeddings_visualizer module

class multimodal_fin.embeddings.visualizer.node_embeddings_visualizer.NodeEmbeddingVisualizer(embeddings, node_names, node_types, categories_10k)[source]

Bases: object

Visualizes and evaluates node-level embeddings using clustering metrics and UMAP projection.

embeddings

List of node embeddings.

Type:

List[torch.Tensor]

node_names

Node identifiers or labels.

Type:

List[str]

node_types

Node types (e.g., “question”, “answer”, “monologue”).

Type:

List[str]

categories_10k

SEC 10-K categories associated with each node.

Type:

List[str]

show_metrics()[source]

Computes and logs clustering evaluation metrics (Silhouette and Davies-Bouldin) for both node type and 10-K category labels.

show_umap(n_neighbors=10, min_dist=0.1)[source]

Displays a UMAP projection of the node embeddings colored by node type and 10-K category.

Parameters:
  • n_neighbors (int) – Number of neighbors for UMAP.

  • min_dist (float) – Minimum distance between points in low-dimensional space.

multimodal_fin.embeddings.visualizer.tree_attention_visualizer module

class multimodal_fin.embeddings.visualizer.tree_attention_visualizer.TreeAttentionVisualizer(root, node_names, attn_weights)[source]

Bases: object

Visualizes a conference tree with attention weights applied to leaf nodes.

Highlights important nodes using size and color based on attention scores.

show(label_angle=30)[source]

Displays the tree using matplotlib and highlights attention weights on leaf nodes.

Parameters:

label_angle (int) – Angle of node labels in degrees. Default is 30.

Module contents