Benchmark From Details#
- class cosasi.benchmark.BenchmarkFromDetails(true_source, G, information_type, I=None, t=None, observer_dict=None, epidemic_model=None, number_sources=None, infection_rate=None)#
Benchmarking tool using provided class args to pass to algorithms when available.
- Parameters
true_source (node or tuple of nodes) – the true source of the diffusion process
G (NetworkX Graph) – The original graph the infection process was run on. I is a subgraph of G induced by infected vertices at observation time.
information_type (str) – describes the information the source inference algorithm receives e.g. “single snapshot”
I (NetworkX Graph) – The infection subgraph observed at a particular time step
t (int) – the timestep corresponding to I
observer_dict (dict or None (optional)) – takes a dict of observers and the timestamps at which they become infected.
epidemic_model (str or None (optional)) – specifies the epidemic model, e.g. SI, SIS, SIR if None, ignores this constraint
number_sources (int or None (optional)) – if int, this is the hypothesized number of infection sources if None, estimates the number of sources
infection_rate (float or None (optional)) – Inter-node infection efficiency. If a float, must be in [0,1] if None, ignores this parameter
Methods
Finds all source localization algorithms applicable to the contagion task specified in the class constructor.
go()Runs all available algorithms with the information we have on hand.
- get_namespaces()#
Finds all source localization algorithms applicable to the contagion task specified in the class constructor.
- go()#
Runs all available algorithms with the information we have on hand.