Giter Site home page Giter Site logo

ablacan / ml-ci Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 223.52 MB

A machine learning method for confidence interval (CI) computation with specific application to Covid-19 forecast on 54 countries.

Python 100.00%
interval forecasting-covid-19 machine-learning random-forest-regression compartmental-models sir-model python

ml-ci's Introduction

PyPI pyversions

ml-ci

Interval forecasting for covid19 cases. Repo in construction...๐Ÿ—๐Ÿ—๐Ÿ—


Main contributor: Alice Lacan
Email: [email protected]


The Covid-19 interval forecasting method developed here leads to a minimization of the negative log-likelihood error up to 15 days ahead. likelihood_results

1. Fit model on real country data

In our work, we focused on the 54 following countries: 'United Kingdom', 'United States','Australia', 'Austria', 'Belgium', 'Bulgaria', 'Canada', 'China', 'Denmark', 'Finland', 'France', 'Germany', 'Greece', 'India', 'Israel', 'Italy', 'Japan', 'Luxembourg', 'Netherlands', 'Norway', 'Poland', 'Portugal', 'Russia', 'South Africa', 'Korea, Republic of', 'Spain', 'Sweden', 'Taiwan', 'Chile', 'Colombia', 'China', 'Egypt', 'Congo', 'Guana', 'Iran', 'Libya', 'Kenya', 'Mexico', 'New Zealand', 'Qatar', 'Peru', 'Sudan', 'Turkey', 'Bangladesh', 'Somalia', 'Singapore', 'Senegal','Ukraine', 'Vietnam', 'Yemen', 'Oman', 'Uruguay', 'Venezuela', 'United Arab Emirates', 'Pakistan'.

To fit our SIR model and stringency parameter on these countries, run the following script:

python /python_scripts/countries_forecast.py

This script will save all results a dictionary in './results_stringency/SIR/result_{COUNTRY}_{TRAIN_WINDOW}days.npy' for each country. The default training window is 100 days (TRAIN_WINDOW=100).

2. Generate simulations

python /python_scripts/run_simulations.py -nb_simulations <NUMBER OF SIMULATIONS>

This script will generate random population numbers (in Millions), stringency data (governmental interventions scenarios) then apply random transofrmations to obtain beta series (transmission rates) and pass them through a SIR model dynamics (no fitting here), to eventually obtain simulated covid19 cases. Both covid19 scenarios and corresponding betas, stringency are stored as a dictionary in '/results_predictor/SIR/simulations_{NUMBER OF SIMULATIONS}samples.npy'.

To load these simulations, run the following with desired key ('simulations' for stringency data, 'betas' for beta series and 'cases' for simulated covid19 cases): simulations_dict = np.load('/results_predictor/SIR/simulations_{NUMBER OF SIMULATIONS}samples.npy', allow_pickle=True).item() simulations_{KEY} = simulations_dict[KEY]

ml-ci's People

Contributors

ablacan avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.