SlideShare a Scribd company logo
1 of 32
Network Analysis Project -
Key Players and Community Detection
Pankaj Mitra | Li Meiyao | Snehal Singupalli | Ashok Eapen | Saravanan Rajamanickam | Deepthi Suresh
[National University of Singapore]
Outline
Problem Statement
Objective
Part 1 - Character Analysis
Part 2 – Battle Analysis
Conclusion
1
5
4
3
2
In Game of thrones, it is highly likely that any character may die
in the next season. All of the GOT fans are always wondering
“Which of my favorite characters are going to meet their ends?”
The characters which is going to die next is “Unpredictable”
Problem Statement
Objective
• Predict who is going to die next using Network
Analysis
• Predict the battle wins using Network Analysis
Answers what we are looking for ?
• Which all kings and commanders have fought the
most number of battles?
• Who is most attacking king and commander? – Hub
• Which king and commander have been attacked the
most? – Authority
• What all types of communities are formed during the
analysis? – Community detection
PART 1
Character Analysis
7
Data of Thrones
character.csv -
contains information
about characters and
when they died.
01
battles.csv - The War
of the Five Kings
02
character-
predictions.csv -
contains character
deaths, including
predictions of how
likely they are to die
03
Cluster Edge
Betweenness
Linear Communities -
Cluster label proportion
Network Analysis – Character Importance
• Betweenness –
Eddard Stark
• Degree & Weighted Degree
– Quellon Greyjoy, Walder
Frey
• Closeness – Sansa Stark
• Page Rank – Oberyn Martell
• Eigenvector centrality – Tywin
Lannister
Model Building – Using Network Features
Data Pre-
processing
Nodes and Edges –
Using Character dataset
01
Features
Extraction
Centrality Measures
Degree, Eigen Vector
Centrality, Page Rank
02
Model Building
Random Forest
Classifier
03
Evaluation
Individual
Probabilities
04
Feature Extraction
Table 1: the set of features (based on network analysis) and the target variable (whether a certain character died) for
randomly selected characters.
Name ID male degree degree_std closeness closeness_std page_rank eigenvector eigen_centrality
Alys Arryn 1 0 2 0.009661836 0.000170561 8.24E-07 0.005098915 -0.000354421 0.001597952
Jasper Arryn 3 1 2 0.009661836 0.000176118 8.51E-07 0.004524229 -0.000354421 0.007076567
Jon Arryn 5 1 5 0.024154589 0.000181984 8.79E-07 0.009623742 -0.000886052 0.031264637
Lysa Arryn 6 0 5 0.024154589 0.000188005 9.08E-07 0.00813524 -0.000886052 0.097022091
Rowena Arryn 8 0 1 0.004830918 0.000175994 8.50E-07 0.00235719 -0.00017721 0.006732467
Cassana Baratheon 9 0 4 0.019323671 0.000190476 9.20E-07 0.005097146 -0.000708841 0.311475569
Cersei Lannister 10 0 6 0.028985507 0.000198491 9.59E-07 0.006628596 -0.001063262 0.916898001
Jaime Lannister 11 1 5 0.024154589 0.000197589 9.55E-07 0.005665075 -0.000886052 0.764286992
Insights
• Degree
• Weighted Degree
• Closeness
• Betweenness
• Page Rank
• Eigenvector centrality
Goal
Our goal then is to relate network position to survival:
“Does one predict the other?”
In other words, we want to train an algorithm to figure out which network
measures predict whether a character has died.
Results
Name degree degree_std closeness closeness_std page_rank eigenvector eigen_centrality Dead
Catelyn Stark 8 0.038647 0.000199 9.60E-07 0.010555 -0.00142 0.444106 1
Viserys Targaryen 2 0.009662 0.000183 8.86E-07 0.00319 -0.00035 0.017288 1
Rickard Stark 7 0.033816 0.000195 9.42E-07 0.009495 -0.00124 0.310353 1
Elia Martell 4 0.019324 0.000187 9.04E-07 0.006313 -0.00071 0.023649 1
Eddard Stark 9 0.043478 0.0002 9.68E-07 0.011725 -0.00159 0.515154 1
Robert Baratheon 6 0.028986 0.000195 9.41E-07 0.006801 -0.00106 0.708704 0.9
Drogo 1 0.004831 0.000177 8.57E-07 0.00223 -0.00018 0.004324 0.8
Oberyn Martell 10 0.048309 0.000176 8.52E-07 0.018402 -0.00177 0.002806 0.7
Cersei Lannister 6 0.028986 0.000198 9.59E-07 0.006629 -0.00106 0.916898 0.5
Arya Stark 2 0.009662 0.000194 9.37E-07 0.00295 -0.00035 0.206565 0.2
Jaime Lannister 5 0.024155 0.000198 9.55E-07 0.005665 -0.00089 0.764287 0.2
Jon Snow 3 0.014493 0.000196 9.47E-07 0.004246 -0.00053 0.160769 0.2
Sansa Stark 4 0.019324 0.000201 9.73E-07 0.005536 -0.00071 0.329063 0.1
Stannis Baratheon 4 0.019324 0.000185 8.95E-07 0.005759 -0.00071 0.161367 0.1
Bran Stark 2 0.009662 0.000194 9.37E-07 0.00295 -0.00035 0.206565 0
The Deaths were successfully predicted with the accuracy of 63%
Part 2
BATTLES ANALYSIS
• KINGS network
• COMMANDERS network
Attacking King vs Defending King
Total Vertices 10
Total Edges 38
Network Density 0.844
Clustering co-efficient 0.2727
The Kings’ Circle
Attacking vs Defending Commander
Number of Vertices 90
Nodes 160
Density 0.039
Clustering co-efficient 0.399
The colors represent the Kings the Commanders belong to
The network of Commanders is less dense because
unlike kings there are many commanders and there is no
close knit network or repeated battles between same
commanders
However, higher CC than the Kings, implies a higher
chance a commander’s opponent commander is likely to
have fought with its neighboring commander
Commander vs Commander
Kings vs Kings Commander vs Commander
Commander Network id the scale free networkKings Network follows a power law distribution
Kings vs Kings: Which King has faced most battles??
NETWORK: node represents the degree
J/TB faced most number of battles
J/TB also seems to be most powerful an hence raging many
battles
Kings vs Kings:
J/TB - Joffrey/Tommen Baratheon is the
most attacking king
RS - Rob Stark is the king who was
most attacked
Kings vs Kings: Which the main groups of enemy Kings??
Walk Trap Community:
Communities with more edges within
community than between community
So here we see groups with most battles
within group than between groups
Commander vs Commander
Colors represent Kings
1) Commanders of J/TB in Red
2) Commanders of RS in Blue and
3) Commanders of SB in Pink
HUB – Who has been the most attacking commander?
• We see that the King in Pink, SB, Stannis
Baratheon has many commanders who have been on
the attacking the most number of times even when we
have J/TB Joffrey/Tommen Baratheon who is the
most attacking king
• This may mean J/TB keeps changing his
commanders or probably SB prefers to use the
same set of trusted commanders
Which commander has been attacked the most?
• Major Authorities belong to J/TB Joffrey/Tommen Baratheon even when J/TB is the most attacking King
and in purple colour, RB - Ranley Baratheon
Commander Vs Commander
More Battles with in Groups than between
groups
The two largest commander community is made up of
commanders of the HUB (J/TB) Joffrey/Tommen Baratheon
and the Authority King (RS) Robb Stark
The two largest walk trap Community
Similarity Analysis Between Commanders
Similarity derived on basis of :
• Total Battles
• Total Defends
• Kings they belong to
• Total Wins
The edges were weighted with the similarity
The range of Similarity is 1.47 to 9.31
• So we decide the to the most similar commanders
with similarity greater than 8.132
Clusters of most Similar Commanders
The Similarity Analysis and then clustering
using Walk-trap community we see 2 groups
emerging
Commanders Total Wins Total Losses
Total
Attacks
Total
battles
Total
Defends
Kings
Stannis Baratheon 9 4 8 13 5 Robb Stark
Renly Baratheon 0 2 0 2 2 Renly Baratheon
Cortnay Penrose 0 2 0 2 2 Renly Baratheon
Asha Greyjoy 0 2 0 2 2 Balon/Euron Greyjoy
Davos Seaworth 5 7 12 12 0 Stannis Baratheon
Loras Tyrell 0 2 0 2 2 Renly Baratheon
Randyll Tarly 5 1 0 6 6 Renly Baratheon
Can we predict the Battle Outcome Using the HUB and Authority Scores ?
• We considered using the Hub and Authority Scores to predict the outcome of the battle and considered the
following scenario.
• Algorithms Tried: Logistic Regression, SVM, Neural Net
• SVM was best model with highest Accuracy
Using Original Data
Y Battle Outcome (Win or Loss)
X1 Attacker Troop Size
X2 Defender Troop Size
X3 Total Attackers
X4 Total Defenders
Using the Hub and Authority Scores
Y Battle Outcome (Win or Loss)
X1 Att.King.hub
X2 Def.King.hub
X3 Att.King.auth
X4 Def.King.auth
X5 Att.Comm.hub
X6 Def.Comm.hub
X7 Att.Comm.auth
X8 Def.Comm.auth
Accuracy of 100% 
Accuracy of 90% 
Note: The data is very small only 38 battles. With only 5
losses hence even without the hub scores the original data
yielded more accurate results
Conclusion
• Community Detection with respect to the following categories are identified
o Characters
o Battles
• Key Players Detections – Characters, Battles
• Predicted which character is going to die next and also predicted the battle wins using
Network Analysis
• Hub and Authority Scores were not useful in prediction of the battle outcome
because the data of battles is very small (only 38 battles) without much variations
in outcome (only 5 Losses of the attacking side).
• This method can however prove useful with larger data with more variations
Further Discussion
Thank You

More Related Content

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Game of thrones - Network Analysis

  • 1. Network Analysis Project - Key Players and Community Detection Pankaj Mitra | Li Meiyao | Snehal Singupalli | Ashok Eapen | Saravanan Rajamanickam | Deepthi Suresh [National University of Singapore]
  • 2. Outline Problem Statement Objective Part 1 - Character Analysis Part 2 – Battle Analysis Conclusion 1 5 4 3 2
  • 3.
  • 4. In Game of thrones, it is highly likely that any character may die in the next season. All of the GOT fans are always wondering “Which of my favorite characters are going to meet their ends?” The characters which is going to die next is “Unpredictable” Problem Statement
  • 5. Objective • Predict who is going to die next using Network Analysis • Predict the battle wins using Network Analysis Answers what we are looking for ? • Which all kings and commanders have fought the most number of battles? • Who is most attacking king and commander? – Hub • Which king and commander have been attacked the most? – Authority • What all types of communities are formed during the analysis? – Community detection
  • 7. Data of Thrones character.csv - contains information about characters and when they died. 01 battles.csv - The War of the Five Kings 02 character- predictions.csv - contains character deaths, including predictions of how likely they are to die 03
  • 8.
  • 10. Linear Communities - Cluster label proportion
  • 11. Network Analysis – Character Importance • Betweenness – Eddard Stark • Degree & Weighted Degree – Quellon Greyjoy, Walder Frey • Closeness – Sansa Stark • Page Rank – Oberyn Martell • Eigenvector centrality – Tywin Lannister
  • 12. Model Building – Using Network Features Data Pre- processing Nodes and Edges – Using Character dataset 01 Features Extraction Centrality Measures Degree, Eigen Vector Centrality, Page Rank 02 Model Building Random Forest Classifier 03 Evaluation Individual Probabilities 04
  • 13. Feature Extraction Table 1: the set of features (based on network analysis) and the target variable (whether a certain character died) for randomly selected characters. Name ID male degree degree_std closeness closeness_std page_rank eigenvector eigen_centrality Alys Arryn 1 0 2 0.009661836 0.000170561 8.24E-07 0.005098915 -0.000354421 0.001597952 Jasper Arryn 3 1 2 0.009661836 0.000176118 8.51E-07 0.004524229 -0.000354421 0.007076567 Jon Arryn 5 1 5 0.024154589 0.000181984 8.79E-07 0.009623742 -0.000886052 0.031264637 Lysa Arryn 6 0 5 0.024154589 0.000188005 9.08E-07 0.00813524 -0.000886052 0.097022091 Rowena Arryn 8 0 1 0.004830918 0.000175994 8.50E-07 0.00235719 -0.00017721 0.006732467 Cassana Baratheon 9 0 4 0.019323671 0.000190476 9.20E-07 0.005097146 -0.000708841 0.311475569 Cersei Lannister 10 0 6 0.028985507 0.000198491 9.59E-07 0.006628596 -0.001063262 0.916898001 Jaime Lannister 11 1 5 0.024154589 0.000197589 9.55E-07 0.005665075 -0.000886052 0.764286992
  • 14. Insights • Degree • Weighted Degree • Closeness • Betweenness • Page Rank • Eigenvector centrality
  • 15. Goal Our goal then is to relate network position to survival: “Does one predict the other?” In other words, we want to train an algorithm to figure out which network measures predict whether a character has died.
  • 16. Results Name degree degree_std closeness closeness_std page_rank eigenvector eigen_centrality Dead Catelyn Stark 8 0.038647 0.000199 9.60E-07 0.010555 -0.00142 0.444106 1 Viserys Targaryen 2 0.009662 0.000183 8.86E-07 0.00319 -0.00035 0.017288 1 Rickard Stark 7 0.033816 0.000195 9.42E-07 0.009495 -0.00124 0.310353 1 Elia Martell 4 0.019324 0.000187 9.04E-07 0.006313 -0.00071 0.023649 1 Eddard Stark 9 0.043478 0.0002 9.68E-07 0.011725 -0.00159 0.515154 1 Robert Baratheon 6 0.028986 0.000195 9.41E-07 0.006801 -0.00106 0.708704 0.9 Drogo 1 0.004831 0.000177 8.57E-07 0.00223 -0.00018 0.004324 0.8 Oberyn Martell 10 0.048309 0.000176 8.52E-07 0.018402 -0.00177 0.002806 0.7 Cersei Lannister 6 0.028986 0.000198 9.59E-07 0.006629 -0.00106 0.916898 0.5 Arya Stark 2 0.009662 0.000194 9.37E-07 0.00295 -0.00035 0.206565 0.2 Jaime Lannister 5 0.024155 0.000198 9.55E-07 0.005665 -0.00089 0.764287 0.2 Jon Snow 3 0.014493 0.000196 9.47E-07 0.004246 -0.00053 0.160769 0.2 Sansa Stark 4 0.019324 0.000201 9.73E-07 0.005536 -0.00071 0.329063 0.1 Stannis Baratheon 4 0.019324 0.000185 8.95E-07 0.005759 -0.00071 0.161367 0.1 Bran Stark 2 0.009662 0.000194 9.37E-07 0.00295 -0.00035 0.206565 0 The Deaths were successfully predicted with the accuracy of 63%
  • 17. Part 2 BATTLES ANALYSIS • KINGS network • COMMANDERS network
  • 18. Attacking King vs Defending King Total Vertices 10 Total Edges 38 Network Density 0.844 Clustering co-efficient 0.2727 The Kings’ Circle
  • 19. Attacking vs Defending Commander Number of Vertices 90 Nodes 160 Density 0.039 Clustering co-efficient 0.399 The colors represent the Kings the Commanders belong to The network of Commanders is less dense because unlike kings there are many commanders and there is no close knit network or repeated battles between same commanders However, higher CC than the Kings, implies a higher chance a commander’s opponent commander is likely to have fought with its neighboring commander Commander vs Commander
  • 20. Kings vs Kings Commander vs Commander Commander Network id the scale free networkKings Network follows a power law distribution
  • 21. Kings vs Kings: Which King has faced most battles?? NETWORK: node represents the degree J/TB faced most number of battles J/TB also seems to be most powerful an hence raging many battles
  • 22. Kings vs Kings: J/TB - Joffrey/Tommen Baratheon is the most attacking king RS - Rob Stark is the king who was most attacked
  • 23. Kings vs Kings: Which the main groups of enemy Kings?? Walk Trap Community: Communities with more edges within community than between community So here we see groups with most battles within group than between groups
  • 24. Commander vs Commander Colors represent Kings 1) Commanders of J/TB in Red 2) Commanders of RS in Blue and 3) Commanders of SB in Pink
  • 25. HUB – Who has been the most attacking commander? • We see that the King in Pink, SB, Stannis Baratheon has many commanders who have been on the attacking the most number of times even when we have J/TB Joffrey/Tommen Baratheon who is the most attacking king • This may mean J/TB keeps changing his commanders or probably SB prefers to use the same set of trusted commanders
  • 26. Which commander has been attacked the most? • Major Authorities belong to J/TB Joffrey/Tommen Baratheon even when J/TB is the most attacking King and in purple colour, RB - Ranley Baratheon
  • 27. Commander Vs Commander More Battles with in Groups than between groups The two largest commander community is made up of commanders of the HUB (J/TB) Joffrey/Tommen Baratheon and the Authority King (RS) Robb Stark The two largest walk trap Community
  • 28. Similarity Analysis Between Commanders Similarity derived on basis of : • Total Battles • Total Defends • Kings they belong to • Total Wins The edges were weighted with the similarity The range of Similarity is 1.47 to 9.31 • So we decide the to the most similar commanders with similarity greater than 8.132
  • 29. Clusters of most Similar Commanders The Similarity Analysis and then clustering using Walk-trap community we see 2 groups emerging Commanders Total Wins Total Losses Total Attacks Total battles Total Defends Kings Stannis Baratheon 9 4 8 13 5 Robb Stark Renly Baratheon 0 2 0 2 2 Renly Baratheon Cortnay Penrose 0 2 0 2 2 Renly Baratheon Asha Greyjoy 0 2 0 2 2 Balon/Euron Greyjoy Davos Seaworth 5 7 12 12 0 Stannis Baratheon Loras Tyrell 0 2 0 2 2 Renly Baratheon Randyll Tarly 5 1 0 6 6 Renly Baratheon
  • 30. Can we predict the Battle Outcome Using the HUB and Authority Scores ? • We considered using the Hub and Authority Scores to predict the outcome of the battle and considered the following scenario. • Algorithms Tried: Logistic Regression, SVM, Neural Net • SVM was best model with highest Accuracy Using Original Data Y Battle Outcome (Win or Loss) X1 Attacker Troop Size X2 Defender Troop Size X3 Total Attackers X4 Total Defenders Using the Hub and Authority Scores Y Battle Outcome (Win or Loss) X1 Att.King.hub X2 Def.King.hub X3 Att.King.auth X4 Def.King.auth X5 Att.Comm.hub X6 Def.Comm.hub X7 Att.Comm.auth X8 Def.Comm.auth Accuracy of 100%  Accuracy of 90%  Note: The data is very small only 38 battles. With only 5 losses hence even without the hub scores the original data yielded more accurate results
  • 31. Conclusion • Community Detection with respect to the following categories are identified o Characters o Battles • Key Players Detections – Characters, Battles • Predicted which character is going to die next and also predicted the battle wins using Network Analysis • Hub and Authority Scores were not useful in prediction of the battle outcome because the data of battles is very small (only 38 battles) without much variations in outcome (only 5 Losses of the attacking side). • This method can however prove useful with larger data with more variations Further Discussion

Editor's Notes

  1. Degree Centrality: the number of other characters that you interact with. Weighted Degree Centrality: the number of interactions you participate in. Eigenvector Centrality: weighted degree centrality with a feedback boost for interacting with other important characters. You get full credit for the importance of your neighbors. PageRank Centrality: weighted degree centrality with a feedback boost for interacting with other important characters. The importance of your neighbors is split among its neighbors. Closeness Centrality: the average distance to all other characters (measured by number of links you must traverse). For this measure only, smaller numbers are better. Betweenness Centrality: how often you lie on shortest paths between two other characters, making you a broker of information.