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

Restrict the allowance of estimation #165

Closed
lisphilar opened this issue Aug 2, 2020 · 1 comment · Fixed by #166
Closed

Restrict the allowance of estimation #165

lisphilar opened this issue Aug 2, 2020 · 1 comment · Fixed by #166
Labels
bug Something isn't working

Comments

@lisphilar
Copy link
Owner

Summary

This is related to #163 and #164
To keep the quality of estimation, restrict the allowance of estimation. Estimatior.run() (called by Scenario.estimate()) continues estimation if the max value of simulated values are not in the allowance of actual values. The allowance is set (0.8, 1.2) at this time.

Related classes

  • covsirphy.Estimator
  • covsirphy.Scenario

Codes and outputs:

import covsirphy as cs
# Dataset preparation
data_loader = cs.DataLoader("input")
jhu_data = data_loader.jhu()
population_data = data_loader.population()
scenario = cs.Scenario(jhu_data, population_data, country="Italy")
_ = scenario.records()
scenario.trend()
scenario.estimate(cs.SIRF)
scenario.add(end_date="01Jan2021")
_ = scenario.simulate()

Environment

  • CovsirPhy version: 3.6.0-delta
  • Python version; 3.8
  • Installation: pipenv
  • OS: WSL
@lisphilar lisphilar added the bug Something isn't working label Aug 2, 2020
@lisphilar lisphilar added this to the CovsirPhy version 2.7.0 milestone Aug 2, 2020
@lisphilar
Copy link
Owner Author

The allowance can be changed by users with Scenario.estimate(allowance=(0.8, 1.2), but the defalt value will be changed to (0.98, 1.02).
This may lead long running time. We need to shorten running time by refactoring of Estimator class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant