Corley-Kilgore-McCown Exercise 10 Submission#3
Open
kkilgoreND wants to merge 17 commits into
Open
Conversation
…e and max infectivity rates
lyy005
reviewed
Nov 26, 2017
| store_rs.iloc[:,i]=sim[:,0] | ||
| a=ggplot(store_rs,aes(x="time",y="r2")) | ||
| a+geom_point()+coord_cartesian() | ||
|
|
Owner
There was a problem hiding this comment.
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")
lyy005
reviewed
Nov 27, 2017
| 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 |
Owner
There was a problem hiding this comment.
Maximum incidence should be DataOut.iloc[i, 0] in the array
DataOut.iloc[i, 0]=max(incidence) #get the max
lyy005
reviewed
Nov 27, 2017
| #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] |
Owner
There was a problem hiding this comment.
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]
lyy005
reviewed
Nov 27, 2017
| #extract params from dataframe | ||
| for i in range(0,6): | ||
| I0=[1] | ||
| S0=[999,1,0] |
Owner
There was a problem hiding this comment.
In your epiSim function, I = y[0], S = y[1]. Then in your input, S0 should be [1, 999]
lyy005
reviewed
Nov 27, 2017
| #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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.