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

Investigate further sorting of the nodes in user base case #193

Open dburov190 opened 3 years ago

dburov190 commented 3 years ago

First, it wouldn't hurt to understand whether Ollie's fix in ContactNetwork.__convert_array_to_dict solved the correct issue. I'm just not sure it wouldn't affect something else that relies on nodes being consecutive integers, for example.

Second, the error that Jinlong pointed out seems to stem from something else (index out of bounds in line 155 in populations.py). At least it's not clear to me why the fix in ContactNetwork.__convert_array_to_dict would fix it. I believe, to fix Jinlong's error it would be enough to write in lines 29-30 of _master_eqn_init.py:

        transition_rates = TransitionRates.from_samplers(
                population=network.get_node_count(),

instead of

        transition_rates = TransitionRates.from_samplers(
                population=user_network.get_node_count(),

but I'm not sure.

I'm basically making notes to myself to clear it up later; we've had enough of "ah, it works, whatever" moments that turn into "oh, this is clearly not the way it was supposed to be!" moments, so I wanna make sure everything is as expected.