__init__.py 964 B

1234567891011121314151617181920
  1. from .naive_nb import naive_network_benchmarking # noqa: F401
  2. from .online_nb import online_network_benchmarking # noqa: F401
  3. from .lonline_nb import lonline_network_benchmarking # noqa: F401
  4. from .succ_elim_nb import \
  5. successive_elimination_network_benchmarking # noqa: F401
  6. def benchmark_using_algorithm(network, path_list, algorithm_name, bounces, sample_times,C_budget=None):
  7. if algorithm_name == "Vanilla NB":
  8. return naive_network_benchmarking(network, path_list, bounces, sample_times)
  9. elif algorithm_name == "LinkSelFiE":
  10. return online_network_benchmarking(network, path_list, bounces)
  11. elif algorithm_name == "LimitLinkSelFiE":
  12. return lonline_network_benchmarking(network, path_list, bounces, C_budget)
  13. elif algorithm_name == "Succ. Elim. NB":
  14. return successive_elimination_network_benchmarking(network, path_list, bounces)
  15. else:
  16. print("Error: Unknown algorithm name")
  17. exit(1)