Giter Club home page Giter Club logo

2019-ncov's Introduction

HSIR

Keywords: epidemiology, compartmental model, state-space model, time-varying, regularization

Install

git clone [email protected]:WenjieZ/2019-nCoV.git
cd 2019-nCoV
pip install .

Dependency

  • numpy
  • scipy
  • plotly (version 4)

Quick start

Simulation

from hsir.empirical import Region
city = Region(990, 10, 0, 0)  # build a region with 990 susceptible, 10 infectious, 0 removed, 0 quarantined

from hsir.sir import SIR
dynamic = SIR(3, 1, 0.1)  # SIR model (beta=0.3, gamma=0.1)

T = 100  # time horizon
epidemic = dynamic.estimate(city, T)  # simulate the epidemic

from hsir.empirical import Sample
sample = Sample(epidemic, np.arange(T//10, T, T//10), 1000*np.ones(9), 10*np.ones(9), Poi, seed=0)  # sample the epidemic

fig = SIR.plot(epidemic)  # visualize the epidemic
sample.plot(fig)          # visualize the sample

Inference

a = InferSIR()  # infer an SIR model
a.fit(city, sample)  # fit it with the initial condition and the sample
a.dynamic  # the result is stored in the dynamic field

Components

Models

  • SIR
  • SIRQ
  • SIRt
  • SIRQt

Inference

  • InferSIR
  • InferSIRQ
  • InferSIRt
  • InferSIRQt

Entities

  • Region
  • Epidemic
  • Sample
  • Confirmed
  • Resisted

Citation

@article{zheng2020total,
  title={Total Variation Regularization for Compartmental Epidemic Models with Time-varying Dynamics},
  author={Zheng, Wenjie},
  journal={arXiv preprint arXiv:2004.00412},
  year={2020}

2019-ncov's People

Contributors

wenjiez avatar

Stargazers

Han Yong Wunrow avatar  avatar DartPower avatar YW avatar  avatar  avatar loui2008 avatar

Watchers

James Cloos avatar DartPower avatar  avatar  avatar

2019-ncov's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.