v1xerunt / STAN

24 stars 12 forks source link

Cummulative sum #10

Closed DCalhas closed 2 months ago

DCalhas commented 2 months ago

Hi!

First of all I want to congratulate you on the great work! You did a great analysis and have thorough experiments on your paper.

We are using your model to conduct experiments with Portuguese covid data. For this we used the code provided in the notebook that is in this repo. I have some questions about the retrieval of the results done in the notebook:

Sorry for all the questions. We are trying to perform experiments in Portugal and we are not able to replicate your observations with the US data.

Best, David

v1xerunt commented 2 months ago

Hi David,

  1. The model prediction is daily new cases, and we want to get the total infected cases in the prediction window, so we use cumsum to add daily numbers and get the total cases.
  2. The shift is to add the total new infected cases in the prediction window (dI) to the existing case number. I think it should be redundant if you use test_pred_phy_active. But in the model we don't use test_pred_phy_active as final prediction. We always use pred_I as prediction results.
  3. In SIR, the number of infected cases I is the total active cases, but our prediction last_I is the daily new cases, so we need to add it to the existing case number.

Sorry I don't remember exactly about these details as it has been years. Please ask if you have any other questions. If you are looking for a spatio-temporal model, I suggest you check our another work HOIST (https://github.com/v1xerunt/HOIST). We found it is better than STAN.

DCalhas commented 2 months ago

Thank you so much for the quick reply. You were extremely helpful!