Code Monkey home page Code Monkey logo

sirtensor's Introduction

sirtensor

The goal of sirtensor is to harness tensorflow for SIR modelling

Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("njtierney/sirtensor")

Example

This is a basic example

set.seed(2021-07-29-1333)
library(sirtensor)
new_sims <- pop_sim()
new_sims
#> # A tibble: 20 x 3
#>        S     I     R
#>    <int> <int> <int>
#>  1   100     2     0
#>  2   100     2     0
#>  3    98     4     0
#>  4    96     5     1
#>  5    95     6     1
#>  6    89    12     1
#>  7    84    17     1
#>  8    77    23     2
#>  9    71    25     6
#> 10    62    29    11
#> 11    48    40    14
#> 12    37    49    16
#> 13    30    50    22
#> 14    25    46    31
#> 15    18    49    35
#> 16    13    49    40
#> 17    11    45    46
#> 18     8    42    52
#> 19     6    44    52
#> 20     3    44    55

plot(new_sims$S, type = "l", col = "blue", ylim = c(0, new_sims$S[1]))
lines(new_sims$I, col = "red")
lines(new_sims$R, col = "green")

sirtensor's People

Contributors

njtierney avatar

Stargazers

Matthew Begun avatar Lai Hao Ran avatar

Watchers

James Cloos avatar  avatar Lai Hao Ran avatar  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.