implement assessment of the 'quality' of the output of a matching algorithm
Opened this issue · 3 comments
Related to #7. When comparing the performance of the matching algorithms we've implemented (currently just one), we need to have one or more metrics to rate the output. One option is to take the number of buses paired together in the matching, and divide it by the average distance of all buses paired together. The higher the value, the better the quality of the matching.
One of the outputs of the graph_properties function https://github.com/pypsa-meets-earth/network-comparison/blob/main/compare_graph.py#L6 can be used for this. The network_average_degree_connectivity
can be easily used as one of the metrics.
this one is a bit different as while it is a graph theory algorithm we care more about the geography here - essentially what you need to do is to go through the matching of the buses (at the moment this is a pairing) returned by the matching algorithm, and see how far apart (in geographical distance) the pairs of buses are. Then take an average of these distances.
the output of the matching algorithm is a dictionary with keys as buses in network 1 and values as buses in network 2