Python for Operational Research in Healthcare

Size: px
Start display at page:

Download "Python for Operational Research in Healthcare"

Transcription

1 Python for Operational Research in Healthcare There s a library for PyCon UK 201

2

3

4 Data Sex Height Weight 0 M M F M F

5 Data Sex Height Weight 0 M M F M F >>> import scipy.stats. >>> ttest = scipy.stats.ttest_ind(... df[df['sex']=='m']['height'],... df[df['sex']=='f']['height']) >>> ttest.pvalue

6 Machine Learning >>> from sklearn.cluster import KMeans >>> kmeans = KMeans(n_clusters=, random_state=0) >>> kmeans.fit(df[['height', 'Weight']]) >>> df['cluster'] = kmeans.labels_

7 Machine Learning >>> from sklearn.cluster import KMeans >>> kmeans = KMeans(n_clusters=, random_state=0) >>> kmeans.fit(df[['height', 'Weight']]) >>> df['cluster'] = kmeans.labels_

8 Optimisation Full Time.0 per hour hrs, 1hr break, hrs Part Time per hour hrs

9 x = [F, F 10, F 11, P, P 10, P 11, P 12, P 1, P 2, P ] C = [ 60, 60, 60, 2, 2, 2, 2, 2, 2, 2] A = B = min Cx subject to: Ax B x 0

10 >>> import pulp >>> prob = pulp.lpproblem("nurse Rostering", pulp.lpminimize) >>> x = pulp.lpvariable.dicts("x", range(10), cat=pulp.lpinteger) >>> objective_funtion = sum(c[i] * x[i] for i in range(10)) >>> prob += objective_funtion >>> for j in range(10):... prob += sum(a[j][i] * x[i] for i in range(10)) >= B[j] >>> for j in range(10):... prob += x[j] >= 0 >>> prob.solve() >>> [pulp.value(i) for i in x] [-0.0, 1.0, 2.0,.0, -0.0, -0.0, -0.0,.0, -0.0, 1.0]

11 Graph Theory Treherbert Maerdy Treorchy Ystrad Penrhys Llwynypia Wattstown Tonypandy Penygraig Porth

12 Maerdy Ystrad Wattstown Penrhys Llwynypia Treorchy Penygraig Treherbert Tonypandy Porth

13 >>> import networkx as nx >>> towns = ['Porth', 'Wattstown', 'Penrhys', 'Maerdy',... 'Penygraig', 'Tonypandy', 'Llwynypia',... 'Ystrad', 'Treorchy', 'Treherbert'] >>> D = nx.from_numpy_matrix(distances) >>> D = nx.relabel_nodes(d,... {i: towns[i] for i in range(10)}) >>> ranks = nx.betweenness_centrality(d, weight='weight') >>> max(ranks.keys(), key=lambda x: centrality[x]) 'Ystrad'

14 Simulation High Priority Medium Priority Low Priority 10 per hour per hour 2 per hour 1 2 per hour Gamma(, 0.).0

15 Simulation High Priority Medium Priority Low Priority 10 per hour per hour 2 per hour 1 2 per hour Gamma(, 0.1).0 Lognormal(0, 0.) Lognormal(-1.2, 0.2) Gamma(, 0.)

16 >>> import ciw >>> N = ciw.create_network(... Arrival_distributions={... 'Class 0': [['Exponential', 10.0]],... 'Class 1': [['Exponential',.0]],... 'Class 2': [['Exponential', 2.0]],... 'Class ': [['Exponential', 0.]]},... Service_distributions={... 'Class 0': [['Gamma',, 0.1]],... 'Class 1': [['Lognormal', -1.2, 0.2]],... 'Class 2': [['Lognormal', 0, 0.]],... 'Class ': [['Gamma',, 0.]]},... Number_of_servers=[10],... Priority_classes={... 'Class 0': 2, 'Class 1': 1, 'Class 2': 1, 'Class ': 0... }... ) >>> average_waits = [] >>> for i in range(10):... ciw.seed(1)... Q = ciw.simulation(n)... Q.simulate_until_max_time(0)... recs = Q.get_all_records()... waits = [r.waiting_time for r in recs if r.arrival_date >= 6]... average_waits.append(np.mean(waits)) >>> np.mean(average_waits)

17 System Dynamics Infectious rate Recovery rate + + Susceptible Infected Recovered + + +

18 System Dynamics α β ds dt + S I R dr dt + ds dt = αsi dr dt = βi di dt = ds dt dr dt

19 >>> from scipy.integrate import odeint >>> def dsir(sir, t, a, b):... s, i, r = sir... return -a*s*i, a*s*i - b*i, b*i >>> t = np.linspace(0, 12, 100) >>> a, b = 0.0, 0. >>> sirs = odeint(func=dsir, y0=[, 1, 0], t=t, args=(a, b)) >>> plt.plot(t, sirs) S I R

20 Game Theory K 1? Divert Hospital 2 K 2? Divert Hospital 1

21 K 2 = 0 K 2 = 0 K 2 = 6 K 2 = K 1 = 0 (.6,.6) (60.2,.6) (1., 6.6) (0.0, 11.0) K 1 = 0 (.6, 60.2) (.6,.6) (0.6, 6.) (., 0.) K 1 = 6 (6.6, 1.) (6., 0.6) (.6,.6) (6., 62.) K 1 = (11.0, 0.0) (0.,.) (62., 6.) (.6,.6)

22 K 2 = 0 K 2 = 0 K 2 = 6 K 2 = K 1 = 0 (.6,.6) (60.2,.6) (1., 6.6) (0.0, 11.0) K 1 = 0 (.6, 60.2) (.6,.6) (0.6, 6.) (., 0.) K 1 = 6 (6.6, 1.) (6., 0.6) (.6,.6) (6., 62.) K 1 = (11.0, 0.0) (0.,.) (62., 6.) (.6,.6) >>> import nash >>> g = nash.game(-o1, -O2) >>> eqs = g.support_enumeration() >>> list(eqs) [(array([ 0., 1., 0., 0.]), array([ 0., 1., 0., 0.]))]

23 Newport Older Person s Pathway Analysis A&E Emergency Admission Local Authority Community Care Day/Home Other Royal Gwent Ysbyty Ystrad Fawr Neville Hall Frailty Falls Rapid Medical Rapid Other Reablement Assessed Out Residential CHC

24 pip install pandas==0.1.0 pip install numpy==1.1. pip install matplotlib==2.0.0 pip install scipy==0.1.1 pip install sklearn==0.1.1 pip install pulp==1.6. pip install networkx==1.11 pip install ciw==1.1. pip install Emojis thanks to Twemoji.

MAS212 Scientific Computing and Simulation

MAS212 Scientific Computing and Simulation MAS212 Scientific Computing and Simulation Dr. Sam Dolan School of Mathematics and Statistics, University of Sheffield Autumn 2017 http://sam-dolan.staff.shef.ac.uk/mas212/ G18 Hicks Building s.dolan@sheffield.ac.uk

More information

SIR model. (Susceptible-Infected-Resistant/Removed) Outlook. Introduction into SIR model. Janusz Szwabiński

SIR model. (Susceptible-Infected-Resistant/Removed) Outlook. Introduction into SIR model. Janusz Szwabiński SIR model (Susceptible-Infected-Resistant/Removed) Janusz Szwabiński Outlook Introduction into SIR model Analytical approximation Numerical solution Numerical solution on a grid Simulation on networks

More information

Algorithms for Uncertainty Quantification

Algorithms for Uncertainty Quantification Technische Universität München SS 2017 Lehrstuhl für Informatik V Dr. Tobias Neckel M. Sc. Ionuț Farcaș April 26, 2017 Algorithms for Uncertainty Quantification Tutorial 1: Python overview In this worksheet,

More information

Diffusion processes on complex networks

Diffusion processes on complex networks Diffusion processes on complex networks Lecture 8 - SIR model Janusz Szwabiński Outlook Introduction into SIR model Analytical approximation Numerical solution Numerical solution on a grid Simulation on

More information

Lorenz Equations. Lab 1. The Lorenz System

Lorenz Equations. Lab 1. The Lorenz System Lab 1 Lorenz Equations Chaos: When the present determines the future, but the approximate present does not approximately determine the future. Edward Lorenz Lab Objective: Investigate the behavior of a

More information

Creative Data Mining

Creative Data Mining Creative Data Mining Using ML algorithms in python Artem Chirkin Dr. Daniel Zünd Danielle Griego Lecture 7 0.04.207 /7 What we will cover today Outline Getting started Explore dataset content Inspect visually

More information

1 Problem 1 Solution. 1.1 Common Mistakes. In order to show that the matrix L k is the inverse of the matrix M k, we need to show that

1 Problem 1 Solution. 1.1 Common Mistakes. In order to show that the matrix L k is the inverse of the matrix M k, we need to show that 1 Problem 1 Solution In order to show that the matrix L k is the inverse of the matrix M k, we need to show that Since we need to show that Since L k M k = I (or M k L k = I). L k = I + m k e T k, M k

More information

Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Mod

Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Mod Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Modeling the World with Arrays The World in a Vector What

More information

dy dt = a by y = a b

dy dt = a by y = a b 12.3 Euler s method and numerical solutions First-Order Linear Differential Equation with y(0) = y 0 given. dy dt = a by Steady state solutions: 0 = dy dt = a by y = a b 12.3 Euler s method and numerical

More information

Differential Equations Practice: 2nd Order Linear: Nonhomogeneous Equations: Variation of Parameters Page 1

Differential Equations Practice: 2nd Order Linear: Nonhomogeneous Equations: Variation of Parameters Page 1 Differential Equations Practice: 2nd Order Linear: Nonhomogeneous Equations: Variation of Parameters Page Questions Example (3.6.) Find a particular solution of the differential equation y 5y + 6y = 2e

More information

Section 8.1 Def. and Examp. Systems

Section 8.1 Def. and Examp. Systems Section 8.1 Def. and Examp. Systems Key Terms: SIR Model of an epidemic o Nonlinear o Autonomous Vector functions o Derivative of vector functions Order of a DE system Planar systems Dimension of a system

More information

Numpy. Luis Pedro Coelho. October 22, Programming for Scientists. Luis Pedro Coelho (Programming for Scientists) Numpy October 22, 2012 (1 / 26)

Numpy. Luis Pedro Coelho. October 22, Programming for Scientists. Luis Pedro Coelho (Programming for Scientists) Numpy October 22, 2012 (1 / 26) Numpy Luis Pedro Coelho Programming for Scientists October 22, 2012 Luis Pedro Coelho (Programming for Scientists) Numpy October 22, 2012 (1 / 26) Historical Numeric (1995) Numarray (for large arrays)

More information

2 Getting Started with Numerical Computations in Python

2 Getting Started with Numerical Computations in Python 1 Documentation and Resources * Download: o Requirements: Python, IPython, Numpy, Scipy, Matplotlib o Windows: google "windows download (Python,IPython,Numpy,Scipy,Matplotlib" o Debian based: sudo apt-get

More information

Epidemics in Networks Part 2 Compartmental Disease Models

Epidemics in Networks Part 2 Compartmental Disease Models Epidemics in Networks Part 2 Compartmental Disease Models Joel C. Miller & Tom Hladish 18 20 July 2018 1 / 35 Introduction to Compartmental Models Dynamics R 0 Epidemic Probability Epidemic size Review

More information

TF Mutiple Hidden Layers: Regression on Boston Data Batched, Parameterized, with Dropout

TF Mutiple Hidden Layers: Regression on Boston Data Batched, Parameterized, with Dropout TF Mutiple Hidden Layers: Regression on Boston Data Batched, Parameterized, with Dropout This is adapted from Frossard's tutorial (http://www.cs.toronto.edu/~frossard/post/tensorflow/). This approach is

More information

Python Analysis. PHYS 224 September 25/26, 2014

Python Analysis. PHYS 224 September 25/26, 2014 Python Analysis PHYS 224 September 25/26, 2014 Goals Two things to teach in this lecture 1. How to use python to fit data 2. How to interpret what python gives you Some references: http://nbviewer.ipython.org/url/media.usm.maine.edu/~pauln/

More information

GEMF: GENERALIZED EPIDEMIC MODELING FRAMEWORK SOFTWARE IN PYTHON

GEMF: GENERALIZED EPIDEMIC MODELING FRAMEWORK SOFTWARE IN PYTHON GEMF: GENERALIZED EPIDEMIC MODELING FRAMEWORK SOFTWARE IN PYTHON HEMAN SHAKERI Network Science and Engineering Group (NetSE) Department of Electrical and Computer Engineering Kansas State University Manhattan,

More information

ECE 5615/4615 Computer Project

ECE 5615/4615 Computer Project Set #1p Due Friday March 17, 017 ECE 5615/4615 Computer Project The details of this first computer project are described below. This being a form of take-home exam means that each person is to do his/her

More information

Python Analysis. PHYS 224 October 1/2, 2015

Python Analysis. PHYS 224 October 1/2, 2015 Python Analysis PHYS 224 October 1/2, 2015 Goals Two things to teach in this lecture 1. How to use python to fit data 2. How to interpret what python gives you Some references: http://nbviewer.ipython.org/url/media.usm.maine.edu/~pauln/

More information

Module 02 Control Systems Preliminaries, Intro to State Space

Module 02 Control Systems Preliminaries, Intro to State Space Module 02 Control Systems Preliminaries, Intro to State Space Ahmad F. Taha EE 5143: Linear Systems and Control Email: ahmad.taha@utsa.edu Webpage: http://engineering.utsa.edu/ taha August 28, 2017 Ahmad

More information

A Network Theoretical Analysis of Admission, Discharge, and Transfer Data Clinical Data Mining and Machine Learning (Part 2) S46

A Network Theoretical Analysis of Admission, Discharge, and Transfer Data Clinical Data Mining and Machine Learning (Part 2) S46 A Network Theoretical Analysis of Admission, Discharge, and Transfer Data Clinical Data Mining and Machine Learning (Part 2) S46 Joe Klobusicky Rensselaer Polytechnic Institute Disclosure All authors of

More information

von Neumann Architecture

von Neumann Architecture Computing with DNA & Review and Study Suggestions 1 Wednesday, April 29, 2009 von Neumann Architecture Refers to the existing computer architectures consisting of a processing unit a single separate storage

More information

epistasis Documentation

epistasis Documentation epistasis Documentation Release 0.1 Zach Sailer May 19, 2017 Contents 1 Table of Contents 3 1.1 Setup................................................... 3 1.2 Basic Usage...............................................

More information

Computer Assignment (CA) No. 11: Autocorrelation And Power Spectral Density

Computer Assignment (CA) No. 11: Autocorrelation And Power Spectral Density Computer Assignment (CA) No. 11: Autocorrelation And Power Spectral Density Problem Statement Recall the autocorrelation function is defined as: N 1 R(τ) = n=0 x[n]x[n τ],τ = 0, 1, 2,..., M Compute and

More information

Adverse Weather, Snow and Gritting Procedure

Adverse Weather, Snow and Gritting Procedure Ref:FAC07 WORKPLACE SAFETY AND HEALTH POLICY Adverse Weather, Snow and Gritting Procedure INITIATED BY: APPROVED BY: Board Secretary / Director of Corporate Services and Governance Senior Managers Meeting

More information

CS 453X: Class 1. Jacob Whitehill

CS 453X: Class 1. Jacob Whitehill CS 453X: Class 1 Jacob Whitehill How old are these people? Guess how old each person is at the time the photo was taken based on their face image. https://www.vision.ee.ethz.ch/en/publications/papers/articles/eth_biwi_01299.pdf

More information

Epidemic model for influenza A (H1N1)

Epidemic model for influenza A (H1N1) Epidemic model for influenza A (H1N1) Modeling the outbreak of the pandemic in Kolkata, West Bengal, India, 2010 Sandipan Dey India July 8, 2017 2 Summary In this report, the spread of the pandemic influenza

More information

MCMC 2: Lecture 2 Coding and output. Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham

MCMC 2: Lecture 2 Coding and output. Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham MCMC 2: Lecture 2 Coding and output Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham Contents 1. General (Markov) epidemic model 2. Non-Markov epidemic model 3. Debugging

More information

NumPy 1.5. open source. Beginner's Guide. v g I. performance, Python based free open source NumPy. An action-packed guide for the easy-to-use, high

NumPy 1.5. open source. Beginner's Guide. v g I. performance, Python based free open source NumPy. An action-packed guide for the easy-to-use, high NumPy 1.5 Beginner's Guide An actionpacked guide for the easytouse, high performance, Python based free open source NumPy mathematical library using realworld examples Ivan Idris.; 'J 'A,, v g I open source

More information

S. L. Lee K. W. Liang X. B. Pan RogerC.E.Tan. Department of Mathematics,

S. L. Lee K. W. Liang X. B. Pan RogerC.E.Tan. Department of Mathematics, SEIR MODEL: SARS OUTSIDE THE HOSPITAL S. L. Lee K. W. Liang X. B. Pan RogerC.E.Tan Department of Mathematics, NUS Typeset by AMS-TEX 1 2 Some Questions of SARS Epidemic ² Epidemics in hospital vs. outside

More information

Can you predict the future..?

Can you predict the future..? Can you predict the future..? Gaussian Process Modelling for Forward Prediction Anna Scaife 1 1 Jodrell Bank Centre for Astrophysics University of Manchester @radastrat September 7, 2017 Anna Scaife University

More information

Mathematical modelling and controlling the dynamics of infectious diseases

Mathematical modelling and controlling the dynamics of infectious diseases Mathematical modelling and controlling the dynamics of infectious diseases Musa Mammadov Centre for Informatics and Applied Optimisation Federation University Australia 25 August 2017, School of Science,

More information

MCMC 2: Lecture 3 SIR models - more topics. Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham

MCMC 2: Lecture 3 SIR models - more topics. Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham MCMC 2: Lecture 3 SIR models - more topics Phil O Neill Theo Kypraios School of Mathematical Sciences University of Nottingham Contents 1. What can be estimated? 2. Reparameterisation 3. Marginalisation

More information

ECS 289 / MAE 298, Lecture 7 April 22, Percolation and Epidemiology on Networks, Part 2 Searching on networks

ECS 289 / MAE 298, Lecture 7 April 22, Percolation and Epidemiology on Networks, Part 2 Searching on networks ECS 289 / MAE 298, Lecture 7 April 22, 2014 Percolation and Epidemiology on Networks, Part 2 Searching on networks 28 project pitches turned in Announcements We are compiling them into one file to share

More information

Introduction to Python

Introduction to Python Introduction to Python Luis Pedro Coelho Institute for Molecular Medicine (Lisbon) Lisbon Machine Learning School II Luis Pedro Coelho (IMM) Introduction to Python Lisbon Machine Learning School II (1

More information

Mathematical Modeling and Analysis of Infectious Disease Dynamics

Mathematical Modeling and Analysis of Infectious Disease Dynamics Mathematical Modeling and Analysis of Infectious Disease Dynamics V. A. Bokil Department of Mathematics Oregon State University Corvallis, OR MTH 323: Mathematical Modeling May 22, 2017 V. A. Bokil (OSU-Math)

More information

Transmission in finite populations

Transmission in finite populations Transmission in finite populations Juliet Pulliam, PhD Department of Biology and Emerging Pathogens Institute University of Florida and RAPIDD Program, DIEPS Fogarty International Center US National Institutes

More information

Introduction to Stochastic SIR Model

Introduction to Stochastic SIR Model Introduction to Stochastic R Model Chiu- Yu Yang (Alex), Yi Yang R model is used to model the infection of diseases. It is short for Susceptible- Infected- Recovered. It is important to address that R

More information

Stochastic processes and Data mining

Stochastic processes and Data mining Stochastic processes and Data mining Meher Krishna Patel Created on : Octorber, 2017 Last updated : May, 2018 More documents are freely available at PythonDSP Table of contents Table of contents i 1 The

More information

Chapter Learning Objectives. Probability Distributions and Probability Density Functions. Continuous Random Variables

Chapter Learning Objectives. Probability Distributions and Probability Density Functions. Continuous Random Variables Chapter 4: Continuous Random Variables and Probability s 4-1 Continuous Random Variables 4-2 Probability s and Probability Density Functions 4-3 Cumulative Functions 4-4 Mean and Variance of a Continuous

More information

INTRODUCTION TO DATA SCIENCE

INTRODUCTION TO DATA SCIENCE INTRODUCTION TO DATA SCIENCE JOHN P DICKERSON Lecture #13 3/9/2017 CMSC320 Tuesdays & Thursdays 3:30pm 4:45pm ANNOUNCEMENTS Mini-Project #1 is due Saturday night (3/11): Seems like people are able to do

More information

SKLearn Tutorial: DNN on Boston Data

SKLearn Tutorial: DNN on Boston Data SKLearn Tutorial: DNN on Boston Data This tutorial follows very closely two other good tutorials and merges elements from both: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/skflow/boston.py

More information

A Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course.

A Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. A Glimpse at Scipy FOSSEE June 010 Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. 1 Introduction SciPy is open-source software for mathematics,

More information

A Mathematical Analysis on the Transmission Dynamics of Neisseria gonorrhoeae. Yk j N k j

A Mathematical Analysis on the Transmission Dynamics of Neisseria gonorrhoeae. Yk j N k j North Carolina Journal of Mathematics and Statistics Volume 3, Pages 7 20 (Accepted June 23, 2017, published June 30, 2017 ISSN 2380-7539 A Mathematical Analysis on the Transmission Dynamics of Neisseria

More information

HW 3. (Posted on March 03, 2017) ax, 0 < x < 1 0, otherwise. f(x)dx = 1).

HW 3. (Posted on March 03, 2017) ax, 0 < x < 1 0, otherwise. f(x)dx = 1). HW 3. (Posted on March 03, 2017) Name: HW 3.1. (Continuous Distribution) Suppose that X has the pdf f(x) = { ax, 0 < x < 1 0, otherwise. (a) Find the value of a (use the requirement f(x)dx = 1). (b) Calculate

More information

Stochastic Models. John M. Drake & Pejman Rohani

Stochastic Models. John M. Drake & Pejman Rohani Epidemiological data are noisy Two types of noise: Observation error: the data are probabilistically related to the true state of the system Process noise: the system progresses probabilistically Environmental

More information

CS 237 Fall 2018, Homework 07 Solution

CS 237 Fall 2018, Homework 07 Solution CS 237 Fall 2018, Homework 07 Solution Due date: Thursday November 1st at 11:59 pm (10% off if up to 24 hours late) via Gradescope General Instructions Please complete this notebook by filling in solutions

More information

DM534 - Introduction to Computer Science

DM534 - Introduction to Computer Science Department of Mathematics and Computer Science University of Southern Denmark, Odense October 21, 2016 Marco Chiarandini DM534 - Introduction to Computer Science Training Session, Week 41-43, Autumn 2016

More information

Stochastic modelling of epidemic spread

Stochastic modelling of epidemic spread Stochastic modelling of epidemic spread Julien Arino Department of Mathematics University of Manitoba Winnipeg Julien Arino@umanitoba.ca 19 May 2012 1 Introduction 2 Stochastic processes 3 The SIS model

More information

ECE521 W17 Tutorial 1. Renjie Liao & Min Bai

ECE521 W17 Tutorial 1. Renjie Liao & Min Bai ECE521 W17 Tutorial 1 Renjie Liao & Min Bai Schedule Linear Algebra Review Matrices, vectors Basic operations Introduction to TensorFlow NumPy Computational Graphs Basic Examples Linear Algebra Review

More information

SHORT ANSWER. Answer the question, including units in your answer if needed. Show work and circle your final answer.

SHORT ANSWER. Answer the question, including units in your answer if needed. Show work and circle your final answer. Math 131 Group Review Assignment (5.5, 5.6) Print Name SHORT ANSWER. Answer the question, including units in your answer if needed. Show work and circle your final answer. Solve the logarithmic equation.

More information

Applications in Biology

Applications in Biology 11 Applications in Biology In this chapter we make use of the techniques developed in the previous few chapters to examine some nonlinear systems that have been used as mathematical models for a variety

More information

Inferring the origin of an epidemic with a dynamic message-passing algorithm

Inferring the origin of an epidemic with a dynamic message-passing algorithm Inferring the origin of an epidemic with a dynamic message-passing algorithm HARSH GUPTA (Based on the original work done by Andrey Y. Lokhov, Marc Mézard, Hiroki Ohta, and Lenka Zdeborová) Paper Andrey

More information

Exercise 1. In the lecture you have used logistic regression as a binary classifier to assign a label y i { 1, 1} for a sample X i R D by

Exercise 1. In the lecture you have used logistic regression as a binary classifier to assign a label y i { 1, 1} for a sample X i R D by Exercise 1 Deadline: 04.05.2016, 2:00 pm Procedure for the exercises: You will work on the exercises in groups of 2-3 people (due to your large group size I will unfortunately not be able to correct single

More information

Combing Open-Source Programming Languages with GIS for Spatial Data Science. Maja Kalinic Master s Thesis

Combing Open-Source Programming Languages with GIS for Spatial Data Science. Maja Kalinic Master s Thesis Combing Open-Source Programming Languages with GIS for Spatial Data Science Maja Kalinic Master s Thesis International Master of Science in Cartography 14.09.2017 Outline Introduction and Motivation Research

More information

Predator-Prey and Weight Change Models

Predator-Prey and Weight Change Models 1 Predator-Prey and Weight Change Models Lab Objective: We introduce built-in methods for solving Initial Value Problems and apply the methods to two dynamical systems. The rst system looks at the relationship

More information

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology Tutorial Graz University of Technology March 22, 2010 Why? is: very readable easy to learn interpreted & interactive like a UNIX shell, only better object-oriented but not religious about it slower than

More information

Test 2 Solutions - Python Edition

Test 2 Solutions - Python Edition 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2017 Test 2 Solutions - Python Edition Michael R. Gustafson II Name (please print) NET ID (please print): In keeping with the Community Standard,

More information

Fixed Point Analysis of Kermack Mckendrick SIR Model

Fixed Point Analysis of Kermack Mckendrick SIR Model Kalpa Publications in Computing Volume, 17, Pages 13 19 ICRISET17. International Conference on Research and Innovations in Science, Engineering &Technology. Selected Papers in Computing Fixed Point Analysis

More information

MATH36061 Convex Optimization

MATH36061 Convex Optimization M\cr NA Manchester Numerical Analysis MATH36061 Convex Optimization Martin Lotz School of Mathematics The University of Manchester Manchester, September 26, 2017 Outline General information What is optimization?

More information

Network Models in Epidemiology

Network Models in Epidemiology Network Models in Epidemiology Considering Discrete and Continuous Dynamics arxiv:1511.01062v1 [q-bio.pe] 19 Oct 2015 Edward Rusu University of Washington email epr24@uw.edu 24 April 2014 Abstract Discrete

More information

Mathematical Analysis of Epidemiological Models: Introduction

Mathematical Analysis of Epidemiological Models: Introduction Mathematical Analysis of Epidemiological Models: Introduction Jan Medlock Clemson University Department of Mathematical Sciences 8 February 2010 1. Introduction. The effectiveness of improved sanitation,

More information

Electronic appendices are refereed with the text. However, no attempt has been made to impose a uniform editorial style on the electronic appendices.

Electronic appendices are refereed with the text. However, no attempt has been made to impose a uniform editorial style on the electronic appendices. This is an electronic appendix to the paper by Alun L. Lloyd 2001 Destabilization of epidemic models with the inclusion of realistic distributions of infectious periods. Proc. R. Soc. Lond. B 268, 985-993.

More information

Uniform and constant electromagnetic fields

Uniform and constant electromagnetic fields Fundamentals of Plasma Physics, Nuclear Fusion and Lasers Single Particle Motion Uniform and constant electromagnetic fields Nuno R. Pinhão 2015, March In this notebook we analyse the movement of individual

More information

SIR Epidemic Model with total Population size

SIR Epidemic Model with total Population size Advances in Applied Mathematical Biosciences. ISSN 2248-9983 Volume 7, Number 1 (2016), pp. 33-39 International Research Publication House http://www.irphouse.com SIR Epidemic Model with total Population

More information

Stochastic modelling of epidemic spread

Stochastic modelling of epidemic spread Stochastic modelling of epidemic spread Julien Arino Centre for Research on Inner City Health St Michael s Hospital Toronto On leave from Department of Mathematics University of Manitoba Julien Arino@umanitoba.ca

More information

Hurricane Prediction with Python

Hurricane Prediction with Python Hurricane Prediction with Python Minwoo Lee lemin@cs.colostate.edu Computer Science Department Colorado State University 1 Hurricane Prediction Hurricane Katrina We lost everything. Katrina didn t care

More information

ME 406 S-I-R Model of Epidemics Part 2 Vital Dynamics Included

ME 406 S-I-R Model of Epidemics Part 2 Vital Dynamics Included ME 406 S-I-R Model of Epidemics Part 2 Vital Dynamics Included sysid Mathematica 6.0.3, DynPac 11.01, 1ê13ê9 1. Introduction Description of the Model In this notebook, we include births and deaths in the

More information

Calculus I Homework: The Derivatives of Polynomials and Exponential Functions Page 1

Calculus I Homework: The Derivatives of Polynomials and Exponential Functions Page 1 Calculus I Homework: The Derivatives of Polynomials and Exponential Functions Page 1 Questions Example Differentiate the function y = ae v + b v + c v 2. Example Differentiate the function y = A + B x

More information

ALGEBRA I FORM I. Textbook: Algebra, Second Edition;Prentice Hall,2002

ALGEBRA I FORM I. Textbook: Algebra, Second Edition;Prentice Hall,2002 ALGEBRA I FORM I Textbook: Algebra, Second Edition;Prentice Hall,00 Prerequisites: Students are expected to have a knowledge of Pre Algebra and proficiency of basic math skills including: positive and

More information

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form Taylor Series Given a function f(x), we would like to be able to find a power series that represents the function. For example, in the last section we noted that we can represent e x by the power series

More information

Models of Infectious Disease Formal Demography Stanford Summer Short Course James Holland Jones, Instructor. August 15, 2005

Models of Infectious Disease Formal Demography Stanford Summer Short Course James Holland Jones, Instructor. August 15, 2005 Models of Infectious Disease Formal Demography Stanford Summer Short Course James Holland Jones, Instructor August 15, 2005 1 Outline 1. Compartmental Thinking 2. Simple Epidemic (a) Epidemic Curve 1:

More information

Chapter 5: Generating Random Numbers from Distributions

Chapter 5: Generating Random Numbers from Distributions Chapter 5: Generating Random Numbers from Distributions See Reading Assignment OR441-DrKhalid Nowibet 1 Review 1 Inverse Transform Generate a number u i between 0 and 1 (one U-axis) and then find the corresponding

More information

Network Theory with Applications to Economics and Finance

Network Theory with Applications to Economics and Finance Network Theory with Applications to Economics and Finance Instructor: Michael D. König University of Zurich, Department of Economics, Schönberggasse 1, CH - 8001 Zurich, email: michael.koenig@econ.uzh.ch.

More information

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09 Department of Chemical Engineering ChE 210D University of California, Santa Barbara Spring 2012 Exercise 2 Due: Thursday, 4/19/09 Objective: To learn how to compile Fortran libraries for Python, and to

More information

PROBABILITY THEORY LECTURE 3

PROBABILITY THEORY LECTURE 3 PROBABILITY THEORY LECTURE 3 Per Sidén Division of Statistics Dept. of Computer and Information Science Linköping University PER SIDÉN (STATISTICS, LIU) PROBABILITY THEORY - L3 1 / 15 OVERVIEW LECTURE

More information

Applied Machine Learning Lecture 2, part 1: Basic linear algebra; linear algebra in NumPy and SciPy. Richard Johansson

Applied Machine Learning Lecture 2, part 1: Basic linear algebra; linear algebra in NumPy and SciPy. Richard Johansson Applied Machine Learning Lecture 2, part 1: Basic linear algebra; linear algebra in NumPy and SciPy Richard Johansson linear algebra linear algebra is the branch of mathematics that deals with relationships

More information

Massachusetts Institute of Technology Machine Learning, Fall Problem Set 1 Solutions

Massachusetts Institute of Technology Machine Learning, Fall Problem Set 1 Solutions Section A (background questions) Massachusetts Institute of Technology 6.867 Machine Learning, Fall 26 Problem Set 1 Solutions 1. Let s begin with a little math. Let us denote by P n the probability that

More information

The SIR Disease Model Trajectories and MatLab

The SIR Disease Model Trajectories and MatLab The SIR Disease Model Trajectories and MatLab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 17, 2013 Outline Reviewing the SIR

More information

Lecture Unconstrained optimization. In this lecture we will study the unconstrained problem. minimize f(x), (2.1)

Lecture Unconstrained optimization. In this lecture we will study the unconstrained problem. minimize f(x), (2.1) Lecture 2 In this lecture we will study the unconstrained problem minimize f(x), (2.1) where x R n. Optimality conditions aim to identify properties that potential minimizers need to satisfy in relation

More information

APPLICATIONS OF INTEGRATION

APPLICATIONS OF INTEGRATION 6 APPLICATIONS OF INTEGRATION APPLICATIONS OF INTEGRATION 6.5 Average Value of a Function In this section, we will learn about: Applying integration to find out the average value of a function. AVERAGE

More information

Here we consider soliton solutions of the Korteweg-de Vries (KdV) equation. This equation is given by u t + u u x + 3 u

Here we consider soliton solutions of the Korteweg-de Vries (KdV) equation. This equation is given by u t + u u x + 3 u Lab 3 Solitons Lab Objective: We study traveling wave solutions of the Korteweg-de Vries (KdV) equation, using a pseudospectral discretization in space and a Runge-Kutta integration scheme in time. Here

More information

Laplace Transforms Chapter 3

Laplace Transforms Chapter 3 Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first. Laplace transforms play a key role in important

More information

Least squares and Eigenvalues

Least squares and Eigenvalues Lab 1 Least squares and Eigenvalues Lab Objective: Use least squares to fit curves to data and use QR decomposition to find eigenvalues. Least Squares A linear system Ax = b is overdetermined if it has

More information

Stochastic model of mrna production

Stochastic model of mrna production Stochastic model of mrna production We assume that the number of mrna (m) of a gene can change either due to the production of a mrna by transcription of DNA (which occurs at a rate α) or due to degradation

More information

Exercise_set7_programming_exercises

Exercise_set7_programming_exercises Exercise_set7_programming_exercises May 13, 2018 1 Part 1(d) We start by defining some function that will be useful: The functions defining the system, and the Hamiltonian and angular momentum. In [1]:

More information

Derivation of Itô SDE and Relationship to ODE and CTMC Models

Derivation of Itô SDE and Relationship to ODE and CTMC Models Derivation of Itô SDE and Relationship to ODE and CTMC Models Biomathematics II April 23, 2015 Linda J. S. Allen Texas Tech University TTU 1 Euler-Maruyama Method for Numerical Solution of an Itô SDE dx(t)

More information

Conjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b.

Conjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b. Lab 1 Conjugate-Gradient Lab Objective: Learn about the Conjugate-Gradient Algorithm and its Uses Descent Algorithms and the Conjugate-Gradient Method There are many possibilities for solving a linear

More information

Learning Theory. Machine Learning CSE546 Carlos Guestrin University of Washington. November 25, Carlos Guestrin

Learning Theory. Machine Learning CSE546 Carlos Guestrin University of Washington. November 25, Carlos Guestrin Learning Theory Machine Learning CSE546 Carlos Guestrin University of Washington November 25, 2013 Carlos Guestrin 2005-2013 1 What now n We have explored many ways of learning from data n But How good

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 45

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 45 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 45 Please do not distribute or host these slides without prior permission. Mike

More information

QR Decomposition in a Multicore Environment

QR Decomposition in a Multicore Environment QR Decomposition in a Multicore Environment Omar Ahsan University of Maryland-College Park Advised by Professor Howard Elman College Park, MD oha@cs.umd.edu ABSTRACT In this study we examine performance

More information

DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON

DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON LEAD CONSULTANT, INFOSYS LIMITED SEZ Survey No. 41 (pt) 50 (pt), Singapore Township PO, Ghatkesar Mandal, Hyderabad, Telengana 500088 Word Limit of the

More information

<br /> D. Thiebaut <br />August """Example of DNNRegressor for Housing dataset.""" In [94]:

<br /> D. Thiebaut <br />August Example of DNNRegressor for Housing dataset. In [94]: sklearn Tutorial: Linear Regression on Boston Data This is following the https://github.com/tensorflow/tensorflow/blob/maste

More information

Bayesian Inference for Contact Networks Given Epidemic Data

Bayesian Inference for Contact Networks Given Epidemic Data Bayesian Inference for Contact Networks Given Epidemic Data Chris Groendyke, David Welch, Shweta Bansal, David Hunter Departments of Statistics and Biology Pennsylvania State University SAMSI, April 17,

More information

BMIR Lecture Series on Probability and Statistics Fall, 2015 Uniform Distribution

BMIR Lecture Series on Probability and Statistics Fall, 2015 Uniform Distribution Lecture #5 BMIR Lecture Series on Probability and Statistics Fall, 2015 Department of Biomedical Engineering and Environmental Sciences National Tsing Hua University s 5.1 Definition ( ) A continuous random

More information

The Future of Healthcare? W H A T D O E S T H E F U T U R E H O L D? The Empowered Consumer

The Future of Healthcare? W H A T D O E S T H E F U T U R E H O L D? The Empowered Consumer : : The Future of Healthcare? W H A T D O E S T H E F U T U R E H O L D? The Empowered Consumer Dr. Anne Anne W. Snowdon, W. Snowdon, RN, BScN, Chair MSc, PhD World Health Innovation Network, Odette School

More information

Introduction to Python

Introduction to Python Introduction to Python Luis Pedro Coelho luis@luispedro.org @luispedrocoelho European Molecular Biology Laboratory Lisbon Machine Learning School 2015 Luis Pedro Coelho (@luispedrocoelho) Introduction

More information

DEPARTMENT OF COMPUTER SCIENCE AUTUMN SEMESTER MACHINE LEARNING AND ADAPTIVE INTELLIGENCE

DEPARTMENT OF COMPUTER SCIENCE AUTUMN SEMESTER MACHINE LEARNING AND ADAPTIVE INTELLIGENCE Data Provided: None DEPARTMENT OF COMPUTER SCIENCE AUTUMN SEMESTER 204 205 MACHINE LEARNING AND ADAPTIVE INTELLIGENCE hour Please note that the rubric of this paper is made different from many other papers.

More information

Modeling Rare Events

Modeling Rare Events Modeling Rare Events Chapter 4 Lecture 15 Yiren Ding Shanghai Qibao Dwight High School April 24, 2016 Yiren Ding Modeling Rare Events 1 / 48 Outline 1 The Poisson Process Three Properties Stronger Property

More information

15.5. Applications of Double Integrals. Density and Mass. Density and Mass. Density and Mass. Density and Mass. Multiple Integrals

15.5. Applications of Double Integrals. Density and Mass. Density and Mass. Density and Mass. Density and Mass. Multiple Integrals 15 Multiple Integrals 15.5 Applications of Double Integrals Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. We were able to use single integrals to compute

More information