-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report termination information #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it's a good idea to indicate whether you terminated because of hitting max # of infections
But I think the stuff about "last complete generation" can be retrieved from the simulation results. I'd rather compute all the summary values (e.g., total # of infections, last complete generation, etc.) in the summary output widget/postprocessing.
We can incorporate the "hit max infections" flag into summary outputs. Like, we can define "successful control" as <max infections AND zero infections in CoCoCs.
Thoughts?
I don't see how? Once the queue is gone, how do I know if a generation was in-progress or not? Example:
We never hit the infection at time 2, so no generations are complete (or, I guess technically generation 0 is), so
I don't follow |
I see your point: if infection N_max occurred in generation G, you don't know if the N+1-th would have been in G or G+1 But my hypothesis is that we don't need to know in precisely which ring the simulation finished for any of the relevant outputs? Like, I'm seeing hitting max # of infections as a sign that you're asking this widget to perform outside its specs
If we hit max # of infections, I'd like the main output to be: hey you either need to change the params or you can kiss control goodbye, probably Like, maybe there's some world where you want some % of chains to go extinct, but you're also OK with some chains growing to >100, but that just doesn't feel epidemiologically relevant I think the outputs I want are:
If we really do need more rigorous stats, I'd rather just demand that we push the max # of infections higher. Again, this is just a widget to give you an idea of outcomes. |
I agree that if you don't set I suppose whether we discard those simulations or incorrectly use them, we're still stuck with the fact that conditional summaries are biased towards things looking rosier. |
In other words:
|
Right, I'm saying that the constant M should be large enough that Pr(containment | # infections >= M) is negligible, so that Pr(containment) ~= P(cont | #inf < M) * P(#inf < M). But for now, let's just have a big warning sign that says "you hit max # of infections in x% of simulations; interpret results with care" and see if this is actually a problem before we try to repair the statistics |
This is going to bug me big time if we don't get it satisfactorily right-ish the first time. But on reflection, I was being a bit pessimistic and I do think we can get something which is both interpretable and sensible if we: Track early termination Make the "maxing out means failed containment" assumption to appropriately compute Pr(containment) (sorry, @swo tried to quote this comment but instead edited it and now I can't revert it) |
We can also add warnings about things blowing up impacting results, and a "if your simulations are taking too long, you've probably got an absurdly large |
Yes, this was my thought; this is mostly an escape valve so that you're not sitting for a long time and waiting for a simulation to finish But we should also maybe make this less possible via more sensible slider rangers |
62b6290
to
117a0ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; some things to maybe change downstream; I'll open issues
st.header( | ||
f"Probability of control: {pr_control:.0%}", | ||
help=f"The probability that there are no infections in the {format_control_gens(control_generations)}, or equivalently that the {format_control_gens(control_generations - 1)} do not produce any further infections.", | ||
show = True if n_at_max == 0 else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's some way to refactor all this for mild cleanliness; I'll open a PR if I have something useful to say
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that logic is definitely not the prettiest, happy if there's a cleaner way to express "plot the results unless the user pushes the big red override button"
6a6ba27
to
ee038a4
Compare
* add progress bar * add progress text
Revised per synchronous discussion, this PR now:
max_infections
st.error
instead of a runtime error.max_infections
is being hit and requires them to acknowledge the potentially-fraught results.Known issues:
st.fragment
but since this is already ill-advised usage, that seems like overkill.