AlloViz.AlloViz.Analysis.analyze¶
- AlloViz.AlloViz.Analysis.analyze(filtered, elements, metrics, nodes_dict, edges_dict)[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 theAlloViz.AlloViz.Elements
module, which extend thepandas.DataFrame
class.- Parameters:
- filtered
Filtering
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.
- filtered
- 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 and arguments, with the format: ```
- {
- “btw”: {
“function”: “networkx.algorithms.centrality.betweenness_centrality”, “arguments”: {“weight”: “graph_distance”, “seed”: 0}
}
}
``` 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
andedges_dict
.