nsdlib.algorithms.algorithms_utils module

nsdlib.algorithms.algorithms_utils.compute_error_distances(G: Graph, not_detected_sources: Set[int], invalid_detected_sources: Set[int]) Dict[int | str, float][source]

Compute the error distances for the source detection evaluation.

nsdlib.algorithms.algorithms_utils.compute_source_detection_evaluation(G: Graph, real_sources: List[str | int], detected_sources: int | str | List[str | int]) SourceDetectionEvaluation[source]

Compute the evaluation of the source detection.

nsdlib.algorithms.algorithms_utils.evaluate_nodes(network: Graph, evaluation_alg: NodeEvaluationAlgorithm, *args, **kwargs)[source]

Evaluate nodes in a given network.

nsdlib.algorithms.algorithms_utils.evaluate_nodes_cached(network: Graph, evaluation_alg: NodeEvaluationAlgorithm, *args, **kwargs)[source]

Evaluate nodes in a given network.

nsdlib.algorithms.algorithms_utils.identify_outbreaks(network: Graph, outbreaks_alg: OutbreaksDetectionAlgorithm, *args, **kwargs) Dict[int | str, list][source]

Identify outbreaks in a given network.

nsdlib.algorithms.algorithms_utils.identify_outbreaks_cached(network: Graph, outbreaks_alg: OutbreaksDetectionAlgorithm, *args, **kwargs) Dict[int, list][source]

Identify outbreaks in a given network.

nsdlib.algorithms.algorithms_utils.node_clustering_into_communities(result: NodeClustering) Dict[int | str, list][source]

Convert the node clustering result into a dictionary.

nsdlib.algorithms.algorithms_utils.reconstruct_propagation(G: Graph, IG: Graph, reconstruction_alg: PropagationReconstructionAlgorithm, *args, **kwargs)[source]

Reconstruct the propagation of a given network.

nsdlib.algorithms.algorithms_utils.reconstruct_propagation_cached(G: Graph, IG: Graph, reconstruction_alg: PropagationReconstructionAlgorithm, *args, **kwargs)[source]

Reconstruct the propagation of a given network.