-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Bug] Error when the number of Fatal cases are not changing with SIR-D model #1486
Comments
Thank you for your bug report! Does the following scpript return empty dataframe? import covsirphy as cs
cs.__version__
eng = cs.DataEngineer()
eng.download(country='USA', province='Illinois', databases=["japan", "covid19dh"]);
eng.clean()
eng.transform()
df = eng.all()
df.loc[df['City'] == 'Cook'] |
Thanks you for replying promptly! import covsirphy as cs eng = cs.DataEngineer(['ISO3', 'Province', 'City'], complement=True) actual_df, status, _ = eng.subset(geo=("USA", 'Illinois', 'Cook'), variables="SIRF", complement=True) This gives a subset on city level. However the sample code doesn't add any layers. Therefore eng.subset is acting funny if you provide geo=('Japan', 'Tokyo', ) or any other combination of city and province. |
I may not have understood the point correctly, but |
I think I was able to solve the confusion. I am trying to create a phase dependent model (SIRD) for a city in USA. It seems that value of kappa is 0 for some phases. Colab link below: |
Hi @karanjogi I performed additional analysis and found that the number of fatal cases were not changed in the phases with kappa = 0. If the number of fatal cases is correct, kappa = 0 should be accepted. i.e. We need to fix the |
Hi @lisphilar , Thank you for clearing what the problem is! Can you please suggest a workaround this error? Or where the code change needs to be done? Thanks! |
Thank you for your contribution! Regarding SIR-D model, the error is raised here. Could you add if statements in "try" block? covid19-sir/covsirphy/dynamics/sird.py Lines 138 to 158 in 5eb55ef
The other models (sir.py, sirf.py, sewirf.py) in the directory also have the same issues. Additionally, please add tests (with I look forward to our discussion. |
And could you add a title to this issue? |
Sure! |
Thank you got your pull request! |
Checkbox
Summary
Error while creating a subset for SIRFmodel using eng.subset() for a specific 'geo'
I am trying to create a subset for Illinois. However the sample code for Japan also didn't work at province and city level.
Reproducible example script
The current outputs
Expected outputs
Environment
Package manager (required if installation issue)
pip
Platform (required if installation issue)
MacOS
Additional Context
No response
The text was updated successfully, but these errors were encountered: