mosaicmpi.network.Network.compute_layout#
- Network.compute_layout(algorithm: str = 'community_weighted_spring', base_weight: float = 1.0, shared_community_weight: float = 500, shared_dataset_weight: float = 1.05, community_layout_algorithm: str = 'spring', **kwargs)#
Compute the network layout using a specified algorithm.
- Parameters:
algorithm (str, optional) – Algorithm for network layout. Choose from “neato” (from pyGraphViz, minimizes edge and node overlap), “spring”, “community_weighted_spring” (weights the network for optimal separation of communities and/or datasets), “umap”, defaults to “community_weighted_spring”
base_weight (float, optional) – Starting weight for all edges (applies to community_weighted_spring algorithm only), defaults to 1.0
shared_community_weight (float, optional) – Multiplier if edges connect programs in the same community (applies to community_weighted_spring algorithm only), defaults to 500
shared_dataset_weight (float, optional) – Multiplier if edges connect programs in the same dataset (applies to community_weighted_spring algorithm only), defaults to 1.05
community_layout_algorithm (str, optional) – Algorithm for layout of community network. Choose from “centroid” (centroid of all community programs based on the program graph), “spring”, and “neato” (from pyGraphViz, minimizes edge and node overlap). Defaults to “spring”