Skip to content
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

Controller is not reset during simulation of patients #43

Closed
hannesvoss opened this issue Jan 9, 2022 · 5 comments
Closed

Controller is not reset during simulation of patients #43

hannesvoss opened this issue Jan 9, 2022 · 5 comments
Assignees
Labels

Comments

@hannesvoss
Copy link
Contributor

I discovered that in a batch simulation, there happens no controller reset between patient simulations, even if the controller reset() method is specified. I think this is a pretty serious flaw because in most cases only the first simulated patient will give correct results.
I will prepare a PR for that issue, but wanted to hear your opinion on this issue first.

@jxx123
Copy link
Owner

jxx123 commented Feb 2, 2022

Yes, that is a real bug.

Need to reset it here

def reset(self):
.

Thanks for the report.

Let me know if you are interested in a PR.

@hannesvoss
Copy link
Contributor Author

I'm interested and will open a PR soon.

@jminlee97
Copy link

Hi, could you explain a bit more about what this issue is? I've been using the batch simulation regularly, and would be interested in knowing if this affects any of my experiments. What happens when the controller does not reset?

@hannesvoss
Copy link
Contributor Author

In my case I trained a neural network that used a continuous chain of states and stored the internal state of the neural network (LSTM; hidden state).
Due to the absence of the reset call, the hidden state was carried over from simulation to simulation and when a new simulation was started, a chain of states from the previous simulation + new states from the new simulation was used. This has led to a significant distortion of the results from the second simulation of a simulation batch onwards.
Depending on your experiment setup this could lead to distorted results too.

@hannesvoss
Copy link
Contributor Author

This issue is going to be solved when this PR is merged #47 .

@jxx123 jxx123 closed this as completed May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants