99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CS 7280代做、代寫Python編程語言
CS 7280代做、代寫Python編程語言

時間:2024-11-05  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



GT CS 7280: Network Science
Assignment 4: Modeling Epidemics
Fall 2024
Overview
The objective of this assignment is to experiment with the concepts we covered in Module-4
about network epidemics, and see how the theoretical results that were derived in class
compare to simulation results.
Submission
Please submit your Jupyter Notebook A4-YOURGTUSERNAME.ipynb with requirements.txt
so that we may be able to replicate your Python dependencies to run your code as needed.
With Anaconda, you can do this by running:
conda list -e > requirements.txt
Ensure all graphs and plots are properly labeled with unit labels and titles for x & y axes.
Producing readable, interpretable graphics is part of the grade as it indicates understanding of
the content – there may be point deductions if plots are not properly labeled.
Getting Started
Assignment 4 requires Epidemics on Network python module available here. You can download
this module and run the examples given in the documentation to become familiar with it.
You can install the library using: pip install EoN
This homework, especially parts 2 and 3, might take several minutes to run. Be aware of
this and plan to complete it accordingly.
**IMPORTANT** As with prior assignments the structure has been designed
to have several subsections in each part. The first few subsections are
meant to just define useful functions and the final subsection of each part
is where the functions are called and the analysis is done. If you are
confused about how a function is meant to be used, check the final
subsection in each part to see how they are being called. This should clear
up a lot of potential points of confusion early on.
GT CS 7280: Network Science
Part 1: Outbreak Modeling [40 Points]
The file “fludata.txt” has the list of students, teachers and staff at a school. The interaction
between them was measured based on the proximity of the sensors that people were carrying
on them. The data file has three columns, the first two columns are the IDs of the people and
the third column is the number of interactions.
Construct an undirected graph from that text file using functions in the networkX module. For
the purpose of this assignment, we consider only the unweighted graph (i.e., you can ignore
the third column).
1. [10 points] Suppose there is a pathogen with transmission rate of 0.01 and recovery
rate of 0.5. Suppose that an outbreak started at node **5 (“patient-0”). Complete the
simulate_outbreak function to simulate an outbreak under the SIS model using the
provided parameters. The function should return a list of length n_iter containing
simulation runs where n_iter is an argument to the function.
Important: When running your simulations, you will want to discard the outbreaks that
died out stochastically. To do this, check whether the number of infected nodes at the
last time step is 0 and replace them with a simulation that does not die out. In total you
should have n_iter simulations.
Additionally, complete the plot_outbreaks function to visualize the results of the
simulate_outbreak function. Show the results for each of the simulations on a single
plot and break each simulation into 2 lines, one for the number of infected and the other
for number of susceptible over time. Make sure to properly label these lines and to
create a legend identifying which lines are which.
2. [10 points] In the lecture we modeled the initial exponential increase of the number of
infected nodes as 𝐼(w**5;) ≈ 𝐼 , where 𝜏 is a time constant. Note that here as only
0
Ү**;
w**5;/τ
𝐼
0 = 1
one node was infected initially. Now, complete the get_exponent function to fit an
exponent to the curve of the number of infections. Choose only the initial portion of the
outbreak, say for 𝐼(w**5;) ≤ 100 (the exponential region of the outbreak, where the number of
infected is less than or equal to 100) and return the estimated time constant 𝜏.
Hint: scipy.optimize.curve_fit is a helpful function to fit the exponent to a curve.
Additionally, complete the plot_curve_fit function to plot both the actual number of
infected and the theoretical curve given a value of 𝜏 (for values of Infected < 100). This
function should also compute the r-squared between the two curves and print the value
for 𝜏 and r-squared in the title of the plot. Again, make sure to label both curves and
create a legend identifying which is which.
3. [5 points] In the lecture and textbook we discussed theoretical values for 𝜏 that can be
calculated from properties of the graph and the dynamics of the infection spread.
Complete the calculate_theoretical_taus function to compute:
GT CS 7280: Network Science
○ The random distribution shown in the Lesson 9 Canvas lecture “SIS Model”.
○ The arbitrary distribution from the Canvas lectures shown in the Lesson 9
Canvas lecture “Summary of SI, SIS, SIR Models with Arbitrary Degree
Distribution”.
○ The arbitrary distribution from the textbook found in Ch. 10, Equation 10.21.
Additionally, complete the compare_taus function to show a boxplot of the distribution of
sample 𝜏’s calculated from simulation runs (see 1.5 to understand where these come
from). Visualize the theoretical calculations as dots on the box plot. Again, label each of
these dots with the calculation used to generate them.
4. [10 points] Complete the calculate_theoretical_endemic_size function to compute the
size of the population that remains infected at the endemic state.
Then, complete the compare_endemic_sizes function to plot the distribution of
endemic sizes across several simulation runs as a boxplot, and compare it with the
theoretical calculation for endemic size as a single dot, similarly to the previous
subsection.
5. [5 points] Run the code provided in cell 1.5 and look at the resulting figures. How good of
a fit is the exponential curve in section 1.2? Explain how the theoretical estimates in 1.3
& 1.4 compare to the empirical distribution and indicate which you would consider a
reasonable fit for the data.
Part 2: Transmission Rate [25 Points]
Next, let us vary the transmission rate and see how it affects the spread of infection. Since we
know that only the ratio of the transmission rate and the recovery rate matters, let us keep the
recovery rate constant at 0.5 and vary only the transmission rate.
1. [10 points] Complete the simulate_beta_sweep function to vary the transmission rate
over a range of beta values between beta_min, beta_max with beta_samples number of
points. For each value of the transmission rate, compute 5 simulations to avoid outliers.
You can reuse your simulate_outbreak function from Part 1 in this function.
Next, complete the extract_average_tau function to return a list of the average 𝜏 value
calculated over the five simulation runs for EACH beta value. You may reuse the
get_exponent function from Part 1.
Finally, complete the plot_beta_tau_curves function to show the exponential curve
given by the 𝜏 values for each beta value. The x-axis is time and y-axis is the number of
infected people. Use a log scale on the y-axis and make sure that each line has its own
color. This function should be similar to the plot_curve_fit function in part 1.2, but you
GT CS 7280: Network Science
will be showing a series of exponentials instead of comparing an experimental with a
theoretical curve.
2. [10 points] Complete the extract_average_endemic_size function to return a list of the
average endemic size calculated over the five simulation runs for EACH beta value.
Next, complete the calculate_theoretical_endemic function to find the minimum
theoretical beta values of the transmission rate for an epidemic to occur. Calculate this
minimum based on the equations derived in lecture for both the random distribution and
the arbitrary distribution. Also, calculate the theoretical endemic size for each value of
beta under the assumption of random distribution.
Finally, complete the compare_endemic_sizes_vs_beta function to plot the average
endemic sizes and theoretical endemic sizes as a curve vs beta. Additionally, plot the
minimum values for beta to start an epidemic as vertical lines. Make sure to label each
line and provide a legend.
3. [5 points] Run the code provided in cell 2.3 and look at the resulting figures. How similar
is the theoretical to experimental endemic sizes? How closely do the minimum beta
values provide a reasonable lower bound for the start of an endemic?
Part 3: Patient-0 Centrality & 𝜏 [30 Points]
Now, let us see how the choice of “patient-0” affects the spread of an outbreak. Consider every
node of the network as patient-0, and run the SIS model using the parameters in Part 1 to
compute . Run the simulation with each node in the simulation as patient-0. Hint: You can skip
cases where the infection quickly diminishes to 0.
1. [10 points] Complete the sweep_initial_infected function to complete a single
simulation run for each node in the graph as the initial infected. Check for runs that
stochastically die out and do not save those. Return the list of simulation run results and
a list of nodes (integer IDs) where the simulation was successful.
Additionally, complete the compute_centrality function to calculate the: degree
centrality, closeness centrality (with wf_improved=false), betweenness centrality, and
eigenvector centrality of the graph. Remember to use the unweighted centrality metrics.
Return the centralities for each node where the simulation was kept in the previous
function.
Hint: We provide “nodes” as an argument which is meant to represent the second output
of the previous function. You can use this to filter for centralities of only these nodes
before you return them. Check the cell for 3.3 to see exactly how this is used.
GT CS 7280: Network Science
2. [15 points] Complete the calculate_pearson_correlation to compute the Pearson
correlation coefficient between each centrality metric and 𝜏, along with a p-value for that
correlation.
Additionally, complete the plot_centrality_vs_tau function to plot a scatter plot between
the 𝜏 value that corresponds to each node, and different centrality metrics of that node:
degree centrality, closeness centrality, betweenness centrality, and eigenvector
centrality. Do this all as one figure with four subfigures. Include the Pearson correlation
values as well as the corresponding p-values in the title for each scatter plot. Remember
to use the unweighted centrality metrics.
3. [5 points] Rank these centrality metrics based on Pearson’s correlation coefficient, and
determine which metrics can be a better predictor of how fast an outbreak will spread
from the initial node. Analyze your results. That is, do the results match your intuition? If
they differ, why might that be?
Part 4: Knowledge Question [5 Points]
Answer the following food for thought question from Lesson 10 – Submodularity of Objective
Function:
Prove that a non-negative linear combination of a set of submodular functions is also a
submodular function.
Hint: Make sure you understand the definition of linearity.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp





 

掃一掃在手機打開當前頁
  • 上一篇:COMP2404代做、C++編程設計
  • 下一篇:代寫SESI M2、代做C++編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                91亚洲国产成人精品一区二三| 中文字幕一区二区三中文字幕| 色婷婷久久99综合精品jk白丝| 欧美日韩视频在线第一区| 久久久久九九视频| 免费看日韩精品| 色av综合在线| 日韩毛片精品高清免费| 91网址在线看| 国产丝袜美腿一区二区三区| 亚洲黄色性网站| 9色porny自拍视频一区二区| 欧美xingq一区二区| 日韩电影在线免费观看| 欧美色偷偷大香| 夜夜夜精品看看| 欧美婷婷六月丁香综合色| 亚洲欧洲日韩在线| 91蝌蚪porny九色| 亚洲精品一二三| 欧美久久久久久久久| 九九九精品视频| 国产精品免费久久| 一二三区精品福利视频| 三级久久三级久久| 精品99久久久久久| 国产不卡视频在线播放| 亚洲人成影院在线观看| 欧美日韩大陆在线| 美女视频黄久久| 亚洲天天做日日做天天谢日日欢| 欧美日韩精品欧美日韩精品一| 韩国精品一区二区| 亚洲韩国精品一区| 亚洲天堂中文字幕| 久久久777精品电影网影网 | 亚洲成人精品在线观看| 精品入口麻豆88视频| 欧美福利电影网| 欧美午夜精品一区二区三区| 国产suv一区二区三区88区| 日韩电影在线一区二区三区| 亚洲国产成人精品视频| 一区二区三区小说| 亚洲亚洲精品在线观看| 99久久久久久| a在线欧美一区| 99免费精品视频| 成人污污视频在线观看| 成人一级黄色片| 色综合色综合色综合| 91亚洲精华国产精华精华液| 91亚洲精品一区二区乱码| 欧洲一区二区三区在线| 4438x成人网最大色成网站| 精品国产自在久精品国产| 精品国产1区二区| 日本一二三不卡| 一区二区三区日韩精品视频| 亚洲成人自拍一区| 国产丶欧美丶日本不卡视频| 99精品视频中文字幕| 717成人午夜免费福利电影| 久久女同互慰一区二区三区| 亚洲精品视频一区| 另类小说色综合网站| 99久久精品免费看国产免费软件| 色就色 综合激情| 精品国产免费人成电影在线观看四季| 国产性做久久久久久| 欧美一级欧美三级在线观看 | 欧美另类z0zxhd电影| 国产亚洲综合色| 亚洲国产日产av| 成人av在线一区二区| 欧美一级片在线看| 日韩中文字幕亚洲一区二区va在线 | 欧美日韩在线播放一区| 一区二区三区国产| 国产亚洲一区字幕| 久久久三级国产网站| 日韩高清电影一区| 欧美三区在线观看| 三级在线观看一区二区| 91精品综合久久久久久| 日韩国产一二三区| ww久久中文字幕| 国产精品影音先锋| 亚洲欧洲日韩在线| 色偷偷88欧美精品久久久| 国产精品福利一区二区三区| 国产91在线观看丝袜| 自拍偷拍国产精品| 欧美日韩高清在线| 国产精品中文字幕欧美| 亚洲男人的天堂在线观看| 欧美日韩情趣电影| 国产综合色精品一区二区三区| 国产精品美女久久久久av爽李琼| 99这里只有精品| 午夜激情综合网| 国产精品久久免费看| 欧美一卡二卡在线观看| www.日韩大片| 久久99精品国产.久久久久| 国产精品国产自产拍在线| 欧美一区二区黄色| 97国产精品videossex| 国产成人aaa| 午夜精彩视频在线观看不卡| 国产精品免费免费| 欧美v国产在线一区二区三区| 久久精品国产亚洲a| 亚洲精品大片www| 欧美一区二区高清| 在线观看91精品国产麻豆| 在线观看www91| 国产精品一区在线观看你懂的| 亚洲欧美乱综合| 久久综合精品国产一区二区三区| 国产精品自产自拍| 奇米影视一区二区三区| 国产精品国产三级国产aⅴ中文| 精品久久久影院| 欧美视频一区二区三区在线观看| 久久综合久久99| 26uuu久久天堂性欧美| 日韩欧美一卡二卡| 亚洲精品一区二区三区99| 精品久久五月天| 国产精品另类一区| 亚洲一区在线观看免费观看电影高清| 日本一区二区动态图| 一区二区久久久久| 久久国产精品99久久久久久老狼| 亚洲国产视频在线| 九一九一国产精品| 色乱码一区二区三区88| 日韩亚洲欧美综合| 国产精品高潮呻吟| 精品一区二区三区免费观看| 99精品视频在线观看免费| 欧美日韩亚洲综合| 国产精品乱码人人做人人爱| 婷婷综合另类小说色区| 不卡的电视剧免费网站有什么| 欧美性受极品xxxx喷水| 中文字幕第一区二区| 老司机精品视频导航| 欧美日韩午夜在线| 日韩码欧中文字| 成人黄色在线视频| 中文字幕av一区二区三区免费看| 亚洲444eee在线观看| 91色.com| 一区二区三区在线不卡| 99国产精品久久| 一个色妞综合视频在线观看| 国产精品亚洲人在线观看| 日韩一区二区电影在线| 婷婷综合另类小说色区| 欧美日韩视频第一区| 日韩精品成人一区二区在线| 欧美日韩久久久久久| 日本va欧美va欧美va精品| 欧美日韩精品一区二区三区蜜桃 | 一区二区三区四区不卡在线| **网站欧美大片在线观看| 97成人超碰视| 日韩av成人高清| 久久这里只有精品6| 国产一区二区h| 亚洲午夜久久久久| 久久综合九色综合97_久久久| 国产成人av一区二区三区在线观看| 国产亚洲精品7777| 欧美欧美欧美欧美| 福利一区二区在线观看| 一级精品视频在线观看宜春院 | 在线观看av一区| 国产一区二区三区四区五区美女| 成人免费一区二区三区在线观看| 8v天堂国产在线一区二区| av中文一区二区三区| 蓝色福利精品导航| 一个色综合av| 制服丝袜在线91| 色综合天天综合色综合av| 国产成a人亚洲| 久久精品国产精品青草| 日韩福利视频导航| 日日嗨av一区二区三区四区| 亚洲国产综合91精品麻豆| 亚洲卡通动漫在线| 亚洲一区二区视频在线观看| 国产精品婷婷午夜在线观看| 国产精品理论在线观看| 国产精品免费视频观看| 亚洲卡通欧美制服中文| 亚洲综合色网站|