Skip to content

Corley-Kilgore-McCown Exercise 10 Submission#3

Open
kkilgoreND wants to merge 17 commits into
lyy005:masterfrom
kkilgoreND:master
Open

Corley-Kilgore-McCown Exercise 10 Submission#3
kkilgoreND wants to merge 17 commits into
lyy005:masterfrom
kkilgoreND:master

Conversation

@kkilgoreND

Copy link
Copy Markdown

No description provided.

Comment thread Ex10FullScript.py
store_rs.iloc[:,i]=sim[:,0]
a=ggplot(store_rs,aes(x="time",y="r2"))
a+geom_point()+coord_cartesian()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To plot multiple lines on the same plot:
a+coord_cartesian()+geom_line()+geom_line(aes(x="time",y="r2",color="10"))+geom_line(aes(x="time",y="r3",color="50"))+geom_line(aes(x="time",y="r4",color="100"))+theme_classic()+labs(x="time",y="N")

Comment thread Ex10FullScript.py
for j in range(0, 500):
#calculate incidence at every time step
incidence[j]=sim_df.iloc[j,0]-sim_df.iloc[j-1,0]
DataOut.iloc[i, 1]=max(incidence) #get the max

@lyy005 lyy005 Nov 27, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maximum incidence should be DataOut.iloc[i, 0] in the array
DataOut.iloc[i, 0]=max(incidence) #get the max

Comment thread Ex10FullScript.py
#creates a list to store incidence values
for j in range(0, 500):
#calculate incidence at every time step
incidence[j]=sim_df.iloc[j,0]-sim_df.iloc[j-1,0]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calculate of incidence is I(t) - I(t-1). And I is the second the returned value, which should be:
incidence[j]=sim_df.iloc[j,1]-sim_df.iloc[j-1,1]

Comment thread Ex10FullScript.py
#extract params from dataframe
for i in range(0,6):
I0=[1]
S0=[999,1,0]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your epiSim function, I = y[0], S = y[1]. Then in your input, S0 should be [1, 999]

Comment thread Ex10FullScript.py
#Gleaned information:
#increases in the gamma value appear to have a inverse-correlation with the calculated values
#increases in the beta values appear to have a direct-correlation with the calculated values
#Thus...increase beta to increase the spread of the disease

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-0.25 pts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants