pypsa-meets-earth / network-comparison

GNU General Public License v3.0
2 stars 4 forks source link

implement assessment of the 'quality' of the output of a matching algorithm #8

Open jessLryan opened 6 months ago

jessLryan commented 6 months ago

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.

GbotemiB commented 6 months ago

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.

jessLryan commented 6 months ago

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.

jessLryan commented 6 months ago

the output of the matching algorithm is a dictionary with keys as buses in network 1 and values as buses in network 2