tapios / risk-networks

Code for risk networks: a blend of compartmental models, graphs, data assimilation and semi-supervised learning
Other
2 stars 2 forks source link

health worker age distribution fix #127

Closed lubo93 closed 4 years ago

lubo93 commented 4 years ago

This PR modifies assign_ages to account for differences in the age distribution of health workers. All affected simulation examples were updated as well. I tested the examples in our /paper directory.

As originally intended, we can now use one age distribution for the community and another one for health workers.

Another small (yet important) change was necessary in the health service definition in all simulation examples. Since we are using contact_network = nx.convert_node_labels_to_integers(contact_network) to define our contact network, we also have to use ordered node numbers for the health service:

health_service = HealthService(health_workers = np.arange(node_identifiers['health_workers'].size) ...

lubo93 commented 4 years ago
1. Can you remove the PDFs from the PR.

2. The `assign_ages` function now assumes that the `health_workers` are the first K nodes in the network, is this a permanent assumption now? if not then maybe the 'nodal' setting of ages needs to be slightly more general within the i.e based on `node in health_worker_list` rather than `range(health_worker_population)`
  1. Ok, all PDFs should be removed now.
  2. Due to the use of nx.convert_node_labels_to_integers(contact_network) and its default node sorting (“default” : inherit node ordering from G.nodes()), the first K nodes (where K = health_workers.size) are the health worker nodes. I can also implement something else. For me, it seemed like the most natural thing to do.
odunbar commented 4 years ago

Ok the worker node labelling is ok. i'll approve the merge