AlloViz.AlloViz.Analysis.analyze#

AlloViz.AlloViz.Analysis.analyze(filtered, elements, metrics, nodes_dict, edges_dict, **kwargs)[source]#

Analyze the filtered network

Send the analyses of the passed filtered network for the specified combinations of elements-metrics. Each combination is analyzed independently with single_analysis() using NetworkX’ functions and results are stored as new instances of classes from the AlloViz.AlloViz.Elements module, which extend the pandas.DataFrame class.

Parameters:
filteredFiltering object

Filtered network object.

elementsstr or list, {“edges”, “nodes”}

Network element for which to perform the analysis.

metricsstr or list

Network metrics to compute, which must be keys in the nodes_dict or edges_dict dictionaries.

Other Parameters:
nodes_dict, edges_dictdict

Optional kwarg(s) of the dictionary(ies) that maps network metrics custom names (e.g., betweenness centrality, “btw”) with their corresponding NetworkX function (e.g., “networkx.algorithms.centrality.betweenness_centrality”). Functions strings must be written as if they were absolute imports, and must return a dictionary of edges or nodes, depending on the element dictionary in which they are. The keys of the dictionaries will be used to name the columns of the analyzed data that the functions produce. Defaults are nodes_dict and edges_dict.

**kwargs

Other optional keyword arguments that will be passed to the NetworkX analysis function(s) that is(are) used on the method call in case they need extra parameters.