docs: network-hhmodel example: Separate contact from disease progression#847
docs: network-hhmodel example: Separate contact from disease progression#847
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Awesome! I think we've all felt the need for someone with modeling expertise to take a close look at our examples for quite some time now, so it's great that you're doing this. If you want to look over any other of the examples—or even add new ones that you think are conspicuously missing—definitely feel free to! But obviously don't feel obligated. I'll look into the failing lints and get back to you. Sometimes they feel like a moving target... |
|
I think it's not failing because of the lints. I think it's failing because the example never terminates: |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@bbbruce -- Robert asked for another pair of eyes on this example. Would you take a look? I could do a more full-blown analysis to check for correctness if we consider the prior state to be a gold standard. |
|
@bbbruce I reworked a little bit as per our discussion:
|
This comment was marked as outdated.
This comment was marked as outdated.
- Repair tests - Avoid mutable loops
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
* docs: Network example: Implement Hash for RR * Clarify the setup
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
ixa::network, but instead instantiate edges as entities. This allows us to attach the relative rate of transmission to each edge as a property, rather than encoding the edge types as Rust types. (Unfortunately that's a f64, which leads to some problems with properties needing to implement Hash and Eq.)seir.rslooks for the infected people, then asksnetwork.rswho they contact viaget_contacts(). This is a nicer separation of concerns, so that the infection doesn't need to know about the contact structure.get_contacts()needs adurationargument, that says what contacts will happen over what time period.network::init()to simplify some test interfaces.Separately, I'll note that it might be nice to moving away from saying that contact happens with probability$\delta t \cdot \beta$ toward something like $1-e^{-\beta \cdot \delta t}$ .