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

'do_step_full' fails in master equations ensemble #104

Closed dburov190 closed 4 years ago

dburov190 commented 4 years ago

Creating MasterEquationModelEnsemble with reduced_system=False will result in a crash when simulate method is executed:

Traceback (most recent call last):
  File "./DA_interventions.py", line 197, in <module>
    states_ensemble = master_eqn_ensemble.simulate(day)
  File "../../epiforecast/risk_simulator.py", line 274, in simulate
    self.y0[mm] += self.dt * self.do_step_full(t, self.y0[mm], member, closure = closure)
  File "../../epiforecast/risk_simulator.py", line 226, in do_step_full
    member.y_dot = member.coeffs.dot(member.y0)
  File "/Library/Python/3.7/site-packages/scipy/sparse/base.py", line 363, in dot
    return self * other
  File "/Library/Python/3.7/site-packages/scipy/sparse/base.py", line 502, in __mul__
    raise ValueError('dimension mismatch')
ValueError: dimension mismatch
odunbar commented 4 years ago

In my mind it is likely deprecated to run all 6 states, Alfredo wished to keep it in as an option, but maybe this is a good time to put it to bed? What do you think @agarbuno ? If not - would you like to take this one?

agarbuno commented 4 years ago

I'm worried that @odunbar reported slow behaviour on large networks (10^4 nodes), see #81. I guess the full system won't improve upon this and, as mentioned, will only serve as part of legacy code. I vote to put it to bed :)