Simulated News Spreading on Social Network Sites_Final
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model is a simulated social network sites. Each node represent a people in Online Social Network like twitter or facebook. We will explore the characteristic of news spread on social network and how network grow.
HOW IT WORKS
There is a life time for news. At the begining of life cycle, we will randomly pick a people as news creater.
Rule for network growth: In each tick, every people that feels the news is interesting will twitter the news. We use a possibility to describe the agent behavior of "feeling interesting". The news will be twittered to all the neighbors of the one who retwitter the news and these neighbors will read the news. If they feel the news is interesting, the will retwitter the news in next tick and they will follow the news creater. In this way the number of follower of the news creater increase.
Rule for news spread: The rule is similar to network growth. The only difference is in this situation those people retwitte the news won't follow the new creater. We use this mechanism to see how news being spread in a stable network.
Rule for two different opinion: If we have two group of people with totally different opinion. Those people with different opinion will read the news and ignore it (never retwitter).
HOW TO USE IT
Num-of-nodes: Determine the number of people in the network
Centrality: Decide use which kind of centrality measurement
News-is-interesting: Determing the probability of retwitter
News-life: The life cycle of news
Setup: Initialize a scale free network according to preferential attachment.
Redo layour: Layout the network according to its connectivility.
resize node: resize the node according to the number of neighbors
two-color: split the entire graph into two groups with different opinions. We use this buttom to start simluate news spread between two groups.
grow: forever running buttom to grow the network according to growth rule
grow-once: run growth one tick
Spreadnews: Forever running buttom to spread the news on network
Spreadnews-once: run spread one tick
Num of people read news vs centrality: the plot of number of people read the news and the centrality of news creater
Num of people read news vs local closter coefficient: the plot of number of people read the news and the local closter coefficient of news creater
num of people read news vs tick: a monitor to see the change of number of people read news during different cycle
THINGS TO NOTICE
This model use the NW extension. You can download the extension from "https://github.com/NetLogo/NW-Extension"
The resize buttom will resize the node according to its number of neighbors. If you are simulated a highly connected network, It is not suggested to resize it.
If you run the spread news without network growth, the initial cluster coefficient will be zero because the initial topology of network is scale free network without cycle.
THINGS TO TRY
To better understand the model. You can try to adjust the number of node to be small and use grow-once and spread-once buttom to observe the behavior of model tick by tick. You can also adjust the news life time, which influence the spread depth. Changing the news-interesting slider will change the difficulty of spread.
EXTENDING THE MODEL
One valuable further extension is to build a load buttom that can direct load a real personal social network from facebook or twitter. In this way we can make a comparison between real data and free scale network.
NETLOGO FEATURES
This model use the NW extension. Besides, the implementation use loop as flow control and list as data structure.
RELATED MODELS
There is a HubNet activity direct related to this model. In the literature there are Rumer Propogating model which is related to this model.
CREDITS AND REFERENCES
You can find more about this model on modeling common."http://modelingcommons.org/"
Paper reference:
[1] Dechun Liu; Xi Chen, "Rumor Propagation in Online Social Networks Like Twitter -- A Simulation Study," Multimedia Information Networking and Security (MINES), 2011 Third International Conference on , vol., no., pp.278,282, 4-6 Nov. 2011 [2] Barabási, A.L., R. Albert, and H. Jeong, Mean-field theory for scalefree random networks. Physica A: Statistical Mechanics and its Applications, 1999. 272(1-2): p. 173-187.
[3] Suh, B.; Lichan Hong; Pirolli, P.; Chi, Ed H., "Want to be Retweeted? Large Scale Analytics on Factors Impacting Retweet in Twitter Network," Social Computing (SocialCom), 2010 IEEE Second International Conference on , vol., no., pp.177,184, 20-22 Aug. 2010 [4] Stonedahl, Forrest, Rand, William M. and Wilensky, Uri, Evolving Viral Marketing Strategies (July 2010). GECCO 2010, Portland, Oregon, USA, July 7-11, 2010 ; Robert H. Smith School Research Paper No. RHS 06-133. [5] Joseph J. Pfeiffer , Jennifer Neville, Methods to Determine Node Centrality and Clustering in Graphs with Uncertain Structure, Fifth International AAAI Conference on Weblogs and Social Media. 9 pages, 4 Figures, 2 Apr 2011
Comments and Questions
extensions [ nw ] globals [ centralities clustering-coefficient centralities-diff clustering-coefficient-diff ] turtles-own [ source belong-to ;;news belong to whome centrality local-cluster newscolor ;;initial news color red nodecolor ;;original color ] breed [news a-news] breed [people node] ;;red 15, pink 135, blue 105, yellow 45 to setup clear-all create-people 1 [set color 15 set nodecolor 15 set shape "circle" set size 0.6] create-people 1 [set color 15 set nodecolor 15 create-link-with turtle 0 set shape "circle" set size 0.6] while [count turtles < number-of-nodes] [ setup-initial-network find-partner ] ask one-of turtles[set color 135] let newscreater turtles with [color = 135] nw:set-snapshot turtles links cal-centrality newscreater setup-news ask news [put-ontop] set centralities [] set clustering-coefficient [] set centralities-diff [] set clustering-coefficient-diff [] ;set centralities fput [centrality] of newscreater centralities ;set noderead fput 1 noderead reset-ticks end ;;prefential attachment to setup-initial-network [old-node] create-people 1 [ set color 15 set nodecolor 15 set shape "circle" set size 0.6 if old-node != nobody [ create-link-with old-node ;; position the new node near its partner move-to old-node fd 8 ] ] end to-report find-partner let total random-float sum [count link-neighbors] of turtles let partner nobody ask turtles [ let nc count link-neighbors ;; if there's no winner yet... if partner = nobody [ ifelse nc > total [ set partner self ] [ set total total - nc ] ] ] report partner end ;;;;;;;;;;;;;;;;;;;;;;;;; to setup-news create-news 1 [ set shape "square" set color 45 ;;yellow set newscolor 15 set size 1 set source one-of turtles with [color = 135] ] let temp one-of turtles with [color = 135] ask news [move-to temp set belong-to temp] end to grow ifelse ticks mod news-life = 0 and ticks > 0 [ let countgreen count people with [color = 65] let countpink count people with [color = 135] let countgrey count people with [color = 9] let countsame countgreen + countpink let countdiff countgrey let countread countsame + countdiff ;;set noderead fput countread noderead ask news [die] ask turtles [set color nodecolor] ask one-of turtles [set color 135] let newscreater turtles with [color = 135] setup-news cal-centrality newscreater ;;set centralities fput [centrality] of newscreater centralities ] [ ask turtles with [color = 135] [ while [count link-neighbors with [color = 15 or color = 105] > 0] [ let spread one-of link-neighbors with [color != 135] ;;node we are going to spread let parent one-of turtles-here with [color = 45] ;;news to be spread if spread != nobody [ ifelse [newscolor] of parent = [color] of spread [ ask spread [set color 65] ;; the people with same opinion read the news green if random-float 100 < news-is-interesting [ ask spread [set color 135] ask parent[hatch 1] ask parent [move-to spread set belong-to spread] ask spread [create-link-with [source] of parent] ]] [ ask spread [set color 9] ;; the people with different opinion read the news grey ] ] ] ] ] tick end to spreadnews ifelse ticks mod news-life = 0 and ticks > 0 [ let countgreen count people with [color = 65] let countpink count people with [color = 135] let countgrey count people with [color = 9] let countsame countgreen + countpink let countdiff countgrey let countread countsame + countdiff ;;everyone read news let creater [source] of one-of news ;;set noderead fput countread noderead set centralities fput(list [centrality] of creater countread) centralities set centralities-diff fput(list [centrality] of creater countdiff) centralities-diff if [local-cluster] of creater > 0 [ set clustering-coefficient fput(list [local-cluster] of creater countread) clustering-coefficient set clustering-coefficient-diff fput(list [local-cluster] of creater countdiff) clustering-coefficient-diff ] ask news [die] ask turtles [set color nodecolor] ask one-of turtles [set color 135] let newscreater turtles with [color = 135] setup-news cal-centrality newscreater cal-cluster newscreater ;set centralities fput [centrality] of newscreater centralities ] [ ask turtles with [color = 135] [ while [count link-neighbors with [color = 15 or color = 105] > 0] [ let spread one-of link-neighbors with [color != 135] ;;node we are going to spread let parent one-of turtles-here with [color = 45] ;;news to be spread if spread != nobody [ ifelse [newscolor] of parent = [color] of spread [ ask spread [set color 65] ;; the people with same opinion read the news green if random-float 100 < news-is-interesting [ ask spread [set color 135] ask parent[hatch 1] ask parent [move-to spread set belong-to spread] ]] [ ask spread [set color 9] ;; the people with different opinion read the news grey ] ] ] ] ] tick end to put-ontop hatch 1;;[create-links-with [links]of myself] die end to layout ;; the number 3 here is arbitrary; more repetitions slows down the ;; model, but too few gives poor layouts repeat 3 [ ;; the more turtles we have to fit into the same amount of space, ;; the smaller the inputs to layout-spring we'll need to use let factor sqrt count turtles ;; numbers here are arbitrarily chosen for pleasing appearance layout-spring turtles links (1 / factor) (7 / factor) (1 / factor) display ;; for smooth animation ] ;; don't bump the edges of the world let x-offset max [xcor] of turtles + min [xcor] of turtles let y-offset max [ycor] of turtles + min [ycor] of turtles ;; big jumps look funny, so only adjust a little each time set x-offset limit-magnitude x-offset 0.1 set y-offset limit-magnitude y-offset 0.1 ask turtles [ setxy (xcor - x-offset / 2) (ycor - y-offset / 2) ] ask news [move-to [belong-to] of self] end to-report limit-magnitude [number limit] if number > limit [ report limit ] if number < (- limit) [ report (- limit) ] report number end to resize-nodes ifelse all? turtles [size <= 1] [ ;; a node is a circle with diameter determined by ;; the SIZE variable; using SQRT makes the circle's ;; area proportional to its degree ask turtles [ set size sqrt count link-neighbors ] ] [ ask turtles [ set size 1 ] ] end to cal-centrality [choice] ifelse centrality-measure = "degree-centrality" [ask choice [ set centrality count my-links ] ] [ ask choice[ set centrality runresult (word "nw:" centrality-measure) ] ] ;;report [centrality] of choice end to cal-cluster [choice] ask choice [ let hood link-neighbors ifelse count hood <= 1 [ set local-cluster -1 ] [ let links-in-hood links with [ (member? end1 hood and member? end2 hood) ] set local-cluster (2 * count links-in-hood) / (count hood * (count hood - 1)) ] ] end to cal-local-cluster [choice] ask choice [let num-nei one-of link-neighbors with [color = 15] ] end to two-color ask people with [who mod 2 = 0] [ if color != 135 [ set color 105 set nodecolor 105 ] ] end
There is only one version of this model, created over 12 years ago by Bing Zhang.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
472 Project.zip | data | Everything | over 12 years ago, by Bing Zhang | Download |
Bing Zhang_Proposal.pdf | Original Proposal | over 12 years ago, by Bing Zhang | Download | |
Bing_June 3.pdf | Progress Report_June 3 | over 12 years ago, by Bing Zhang | Download | |
Bing_May 13.pdf | Progress Report_May 13 | over 12 years ago, by Bing Zhang | Download | |
Bing_May 20.pdf | Progress Report_May 20 | over 12 years ago, by Bing Zhang | Download | |
Bing_May 27.pdf | Progress Report_May 27 | over 12 years ago, by Bing Zhang | Download | |
Final Paper_Bing Zhang.pdf | Final Paper | over 12 years ago, by Bing Zhang | Download | |
Simulated News Spreading on Social Network Sites_Final.png | preview | preview | over 12 years ago, by Bing Zhang | Download |
Social_network - final.nlogo | data | NetLogo model | over 12 years ago, by Bing Zhang | Download |
Social_network - HubNet_done.nlogo | data | HubNet Activity | over 12 years ago, by Bing Zhang | Download |
Zhang_Bing_Slam_v2.pptx | powerpoint | Slam | over 12 years ago, by Bing Zhang | Download |
This model does not have any ancestors.
This model does not have any descendants.
Song wei
nw:set-snapshot
Error:Nothing named NW:SET-SNAPSHOT has been defined. please help me solve this error.
Posted almost 9 years ago
nasim baahri
article as a refrence (Question)
I want to address this article as a refrence but it seems it hasn't published in a valid magazine. if it is, please send me information about it. Thanks
Posted over 7 years ago
li li
need your published paper
Have you published a paper on this model?Can I have a reference if there is a paper?Thank you very much.
Posted over 7 years ago