Skip to content

Zoe Soren#5

Open
zoeloh wants to merge 5 commits into
lyy005:masterfrom
zoeloh:master
Open

Zoe Soren#5
zoeloh wants to merge 5 commits into
lyy005:masterfrom
zoeloh:master

Conversation

@zoeloh

@zoeloh zoeloh commented Nov 10, 2017

Copy link
Copy Markdown

No description provided.

Comment thread solution1.py

g1=ggplot(modelOutput,aes(x="time",y="r1"))+geom_line()+geom_line(aes(y="R2"))+geom_line(aes(y="R3"))+geom_line(aes(y="R4"))+geom_line(aes(y="R5"))
g1+theme_classic()

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.

This code looks good except R2 should be r1.

Also, for plotting, you can add color for example:
ggplot(modelOutput,aes(x="time",y="r1",color="1"))+geom_line()+geom_line(aes(x="time",y="r2",color="50"))

Comment thread solution1.py
g3=ggplot(modelOutput,aes(x="time",y="N1"))+geom_line()+geom_line(aes(y="N2"))+geom_line(aes(y="N3"))
g3+theme_classic()

#We dont know how to get all the plots outputted, but the code is there to make them all. We asked stuart but he didn't help us with this specifically

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.

Do you mean the ggplot command is not working? I added some comments above. Let me know if you still have any questions. In general, you guys did a good job on this question!

Comment thread solution2.py
prevalence.sort()

print("B: " + str(listb[i]) + " y: " + str(listy[i]))
print("Max incidence: " + str(incidence[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.

Maximum value should be incidence[-1]

Comment thread solution2.py
bscReproduction = listb[i] * (modelOutput.loc[499, "S"] + modelOutput.loc[499, "I"] + modelOutput.loc[499, "R"]) / listy[i]
print("Basic reproduction number: " + str(bscReproduction))
print("############################################")

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.

Good job!

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.

2 participants