SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
Complex Network:

Science, Data Base,
Programming 
Mahdi Seyednezhad
Ph.D. candidate
Computer Science And CyberSecurity department
Data scientist at Alstom,
Florida Institute of Technology, Melbourne, Florida.
sseyednezhad2013@my.fit.edu
https://seyednejad.wixsite.com/home
Mahdi
Dr. Ronaldo Menezes
• I am Seyed Mohammad
Mahdi Seyednezhad. 

• Don’t worry! You can call me
Mahdi/Mehdi.

• I am working at Alstom as a
data scientist.
Biocomplex Lab.
Who is Mahdi?
!2
My awesome talk plan!
Data Science Complex Network Graph Database
3
Data Science
• Data science in
academia
4
Data Science –
Industry expectations!
• Data engineering
• Data Acquisition
• ETL (Extract, Transform & Load)
• Data base management, Data warehousing
• Feature engineering
• Feature Extraction, Selection, Reduction
• Machine Learning
• Supervised, unsupervised, reinforcement
• Time series, images, tables, text, ...
• Data analytics
• Statistical models
• Structural models
• Complex models
Data science is a spectrum of skills and applications!
5
What is a graph?
• A graph is a discrete math modeling tool.
• A graph has 2 main elements:
• Node (Vertex)
• Edge (Relation)
• For example:
• Graph (Network) of cities
Orlando
Melbourne
Tampa
Miami
Jacksonville
Edge
Edge
Edge
Edge
Edge
6
Complex Network
• A graph generated by real data is called “Network”.
• In the context of network theory, a complex network is a graph
(network) with non-trivial topological features—features that do
not occur in simple networks such as lattices or random graphs
but often occur in graphs modeling of real systems.
A simple network
A complex network 7
Properties of a Network
8
Node1
Node3Node2
Degree(Node1)=2
Degree(Node2)=1
Degree(Node3)=1
Why network science?
• Let’s assume we have data of some people and tweets on
Twitter.
• Who is important?
• We can count!
• What relation is important?
• Who is important by number of relations?
• Who has attracted most attentions?
• How does the relation between entities change?
• It is easy to generalize to various applications.
9
Who is involved with complex networks?
• Physicists
• Computer scientists 
• Social Scientists
• Biologists
• Mathematicians
• Industrial engineers
• Economics
10
Complex network applications
11
Worldwide Air Transportation
12https://phys.org/news/2012-06-method-diverse-complex-networks-similar.html
Network of Brain
https://www.cambridgenetwork.co.uk/news/wiring-the-brain/
13
Map of Internet
14
https://www.kaspersky.com/blog/amazing-internet-maps/10441/
Product Space
•The product space created by
C. Hidalgo.

•It shows how complicated the
products are.

•It is a study in marketing and
economics.
15
16
The structure is important!
We may want analytics independent of entities!
17
Collective Behavior
18
The sequence reveals information
19
Flow of Information
Meme diffusion in online social media
20
Communities
Community-based drug-drug interaction network
21
When should we use network sciences?
• The structure is important!
• The collective behavior matters!
• The sequence reveals information.
• Relation-based communities are desired.
• The flow of information is important.
• Epidemic should be monitored.
• The graph model is suitable for the problem.
22
23
Scientific Tools of Complex Networks
• Strong nerve and good temper!
• Python, R
• Networkx (Python)
• Easy and straight forward
• Somehow slower
• igraph (Python, R)
• Staight forward
• Somehow acceptable network visualization
• Originally inplemented in C++ (a bit faster than Networkx)
• graph-tool (Python)
• Hard to use
• Very nice network visualization
• Contains most of the complicated network algorithms
24
Network visualization tools
Gephi
Cytoscape
Graphviz
25
Let’s learn complex network through an example.
26
It starts with a question?
Sometimes it ends up to more meaningful questions!
27
Start a project with a question/problem
• It starts with a question.
• Do people have the same kind of feelings?
• Do people show their feeling in the same way all around the
world?
• Do we actually feel different when we talk about various
topics?
• Is it possible to group people based on their feeling?
• The questions can explain the motivations.
28
Data Data Data Data Data Data ……
• We should find a good data set to address the questions.
• Do you want more data?
• Yes! Give me more data!
29
Data in our project
• How to identify the feelings?
• Emojis! 😁
• Source of emojis?
• Twitter!
• Is it free?
• Kinda! Enough for research.
• Collect tweets in different topics!
30
Create the network!
To create a network two essential things should be clearly
defined:
• Node (Entity)
• Edge (Relation)
• In our project, each emoji is a node and the cooccurrence is
the edge.
Node1 Node2
Edge
31
Network of Emojis
What a beautiful day out!
We are going to the beach
Can’t believe these waves!
#beachday
1
1
1
1
11
1
2 1
1
1
1
1
1
1
1
1
N-gram of the emojis in a tweet
Combine the N-grams to create the co-occurrence
directed weighted network of emojis
!32
Python code - Networkx
• pip install networkx
• Import networkx and create a graph instance
• import networkx as nx
• G=nx.Graph()
• Add one node
• G.add_node(1)
• Add a list of nodes
• G.add_nodes_from([2,3])
• Add one edge
• G.add_edge(1,2)
• Add a list of edges
• G.add_edges_from([(1,2),(1,3)])
33
Create the adjacency matrix
34
Create the network
35
Call the function for different groups
•The function
def network_builder(group_1, key_based, key_text, out_graphml,
emoji_list, tag)
•Call it:
net = network_builder(group,
‘emoji_List','emoji_position_in_text', file_graphml, emoji_list,
tag=group[0])
36
Graph-tool
• Good luck with installing
graph-tool!
• import graph_tool.all as gt
37
Gt and stochastic block model
38
Network of Emoji
Stochastic Block model on the Organ data set.
The emojis are chosen from the corresponding
network randomly.
!39
https://link.springer.com/chapter/10.1007/978-3-319-72150-7_67
Word-emoji Network
We found a semantic in emojis similar to the semantics of languages.
We found out people are normally happy when they use emojis.
https://www.aaai.org/ocs/index.php/FLAIRS/FLAIRS18/paper/viewPaper/17653
After some mathematical analysis…..
• The structure of the feeling is the same!

• The way we show the feeling is different.

• Similar to languages! 😉
!41
Massive
Data
https://blog.equinix.com/blog/2016/08/01/speak-like-a-data-center-geek-big-data/
•Products/Users of Amazon

•Users of Facebook or Twitter

•Walmart Products

•Users of a Cloud Service

•Massive Text

•Movies on Netflix
42
Network Databases
• There are many options for Graph-based databases.
• Most of them are supported by main cloud services.
• It is important that the graph data base tries to
implement things in a graph model.
• Some data bases just show you the data in a graph model! They
do not store them as a graph!
• Nowadays, big servers offer Graph DBMS along with the classic
data base services.
• The relation between our dates important.
• It is really useful for realtime recommendation.
43
Popular
Graph
DBMS's
• Some of the famous graph data bases
https://db-engines.com/en/ranking/graph+dbms
44
Comparing Graph Databases
Name Neo4j Microsoft Azure
Cosmos DB
OrientDB ArangoDB Janus Graph Amazon Neptune GraphDB
Rank (G-
DBMS)
1 2 3 4 6 8
DB model Graph Multi-model Multi-model Multi-model Graph Multi-model Multi-model
Initial
release
2007 2017 2010 2012 2017 2017 2000
Licence Open source Commercial Open source
(Apache 2)
Open source
(Apache 2)
Open source 
(Apache 2)
Commercial Commercial
Server OS Linux 

OS X

Solaris

Windows
Hosted All OS with a
Java JDK 6+
Linux

OS X

Raspbian

Solaris

Windows
Linux

OS X

Unix

Windows
Hosted All OS with a Java VM

Supported
programmin
g
languuages
.Net, Clojure

Elixir, Go

Groovy, Haskel
l, Java,
JavaScript

Perl, PHP

Python

Ruby, Scala
.Net

C#

Java

JavaScript

JavaScript
(Node.js)

Python
.Net, C, C#, 
C++, Clojure

Java,
JavaScript

Node.js

PHP, Python

Ruby, Scala
C#, Clojure

Java

JavaScript
(Node.js)

PHP, Python

Ruby
Clojure

Java

Python
C#, Go

JavaScript (Node.js)

PHP

Python

Ruby, Scala
.Net, Java

C#, Clojure

JavaScript (Node.js)

PHP

Python

Ruby, Scala
45
Who is using graph data bases?
46
Neo4j - Cypher
• Nodes are surrounded by parenthesis
• () or (p)
• Labels or tags start with’:’ and group nodes by roles or types
• (p:Person:Mammal)
• Nodes can have properties
• (p:Person {name: ‘John’})
47
• Relationships are wrapped with hyphens or square brackets.
• - -> or -[h:HIERD]->
• Direction od relation is specified “<“ and “>”
• (p1)-[:HIERD]->(p2)
• Relationship can have properties.
• -[:HIERD {type: ‘contract’}]->
48
Neo4j, Python, Cypher
• Jennifer likes graphs.
//data stored with this direction
CREATE (p:Person)-[:LIKES]->(t:Technology)
//query relationship backwards will not return results
MATCH (p:Person)<-[:LIKES]-(t:Technology)
//better to query with undirected relationship unless sure of direction
MATCH (p:Person)-[:LIKES]-(t:Technology)
49
Cypher and Python
from neo4jrestclient import client
q = 'MATCH (u:User)-[r:likes]->(m:Beer) WHERE u.name="Marco" RETURN u,
type(r), m'
# "db" as defined before
results = db.query(q, returns=(client.Node, str, client.Node))
for r in results:
print("(%s)-[%s]->(%s)" % (r[0]["name"], r[1], r[2]["name"]))
# The output:
# (Marco)-[likes]->(Punk IPA)
# (Marco)-[likes]->(Hoegaarden Rosee)
•
https://marcobonzanini.com/2015/04/06/getting-started-with-neo4j-and-python/
50
Neo4j - Python
• First, install Neo4j server.
• Neo4j Python driver
• It is officially supported by Neo4j and connects to the database using the binary
protocol. It aims to be minimal, while being idiomatic to Python
• pip install neo4j
• Py2neo
• It is a client library and comprehensive toolkit for working with Neo4j from within
Python applications and from the command line. It has been carefully designed to
be easy and intuitive to use.
• pip install py2neo
• neomodel
• An Object Graph Mapper built on top of the Neo4j python driver. Familiar Django
style node definitions with a powerful query API, thread safe and full transaction
support.
• pip install neomodel
51
Important Complex Network Conferences
• Complenet
• International Conference on Complex Networks
• Exeter, UK (2020)
• Complex Networks
• International Conference on Complex Networks and their Applications
• December 10-12, 2019 - Lisbon, Portugal.
• Netsci
• INTERNATIONAL SCHOOL AND CONFERENCE ON NETWORK SCIENCE
• 27 May 2019 - 31 May 2019, Burlington, United States
52
Thank you!
✌
53
https://seyednejad.wixsite.com/home
Please check out the my webpage for the updates.

Más contenido relacionado

La actualidad más candente

Question answering in linked data
Question answering in linked dataQuestion answering in linked data
Question answering in linked dataReza Ramezani
 
Lecture: Semantic Word Clouds
Lecture: Semantic Word CloudsLecture: Semantic Word Clouds
Lecture: Semantic Word CloudsMarina Santini
 
Introduction to question answering for linked data & big data
Introduction to question answering for linked data & big dataIntroduction to question answering for linked data & big data
Introduction to question answering for linked data & big dataAndre Freitas
 
Question Answering over Linked Data (Reasoning Web Summer School)
Question Answering over Linked Data (Reasoning Web Summer School)Question Answering over Linked Data (Reasoning Web Summer School)
Question Answering over Linked Data (Reasoning Web Summer School)Andre Freitas
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273Abutest
 
Text REtrieval Conference (TREC) Dynamic Domain Track 2015
Text REtrieval Conference (TREC) Dynamic Domain Track 2015Text REtrieval Conference (TREC) Dynamic Domain Track 2015
Text REtrieval Conference (TREC) Dynamic Domain Track 2015Grace Hui Yang
 
2006-05-25__coi-semdis
2006-05-25__coi-semdis2006-05-25__coi-semdis
2006-05-25__coi-semdiswebuploader
 
Frontiers of Computational Journalism week 2 - Text Analysis
Frontiers of Computational Journalism week 2 - Text AnalysisFrontiers of Computational Journalism week 2 - Text Analysis
Frontiers of Computational Journalism week 2 - Text AnalysisJonathan Stray
 
Frontiers of Computational Journalism week 3 - Information Filter Design
Frontiers of Computational Journalism week 3 - Information Filter DesignFrontiers of Computational Journalism week 3 - Information Filter Design
Frontiers of Computational Journalism week 3 - Information Filter DesignJonathan Stray
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Saeedeh Shekarpour
 
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...Rich Heimann
 
Why L-3 Data Tactics Data Science?
Why L-3 Data Tactics Data Science?Why L-3 Data Tactics Data Science?
Why L-3 Data Tactics Data Science?Rich Heimann
 
Web services for supporting the interactions of learners in the social web - ...
Web services for supporting the interactions of learners in the social web - ...Web services for supporting the interactions of learners in the social web - ...
Web services for supporting the interactions of learners in the social web - ...Traian Rebedea
 
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...Jonathan Stray
 
An Introduction to Information Retrieval and Applications
 An Introduction to Information Retrieval and Applications An Introduction to Information Retrieval and Applications
An Introduction to Information Retrieval and Applications sathish sak
 
Project Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social NetworksProject Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social Networksamirhhz
 
The Next Generation of AI-powered Search
The Next Generation of AI-powered SearchThe Next Generation of AI-powered Search
The Next Generation of AI-powered SearchTrey Grainger
 
Semantic Data Retrieval: Search, Ranking, and Summarization
Semantic Data Retrieval: Search, Ranking, and SummarizationSemantic Data Retrieval: Search, Ranking, and Summarization
Semantic Data Retrieval: Search, Ranking, and SummarizationGong Cheng
 
Leveraging Semantic Parsing for Relation Linking over Knowledge Bases
Leveraging Semantic Parsing for Relation Linking over Knowledge BasesLeveraging Semantic Parsing for Relation Linking over Knowledge Bases
Leveraging Semantic Parsing for Relation Linking over Knowledge BasesNandana Mihindukulasooriya
 
M2 l10 fairness, accountability, and transparency
M2 l10 fairness, accountability, and transparencyM2 l10 fairness, accountability, and transparency
M2 l10 fairness, accountability, and transparencyBoPeng76
 

La actualidad más candente (20)

Question answering in linked data
Question answering in linked dataQuestion answering in linked data
Question answering in linked data
 
Lecture: Semantic Word Clouds
Lecture: Semantic Word CloudsLecture: Semantic Word Clouds
Lecture: Semantic Word Clouds
 
Introduction to question answering for linked data & big data
Introduction to question answering for linked data & big dataIntroduction to question answering for linked data & big data
Introduction to question answering for linked data & big data
 
Question Answering over Linked Data (Reasoning Web Summer School)
Question Answering over Linked Data (Reasoning Web Summer School)Question Answering over Linked Data (Reasoning Web Summer School)
Question Answering over Linked Data (Reasoning Web Summer School)
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
 
Text REtrieval Conference (TREC) Dynamic Domain Track 2015
Text REtrieval Conference (TREC) Dynamic Domain Track 2015Text REtrieval Conference (TREC) Dynamic Domain Track 2015
Text REtrieval Conference (TREC) Dynamic Domain Track 2015
 
2006-05-25__coi-semdis
2006-05-25__coi-semdis2006-05-25__coi-semdis
2006-05-25__coi-semdis
 
Frontiers of Computational Journalism week 2 - Text Analysis
Frontiers of Computational Journalism week 2 - Text AnalysisFrontiers of Computational Journalism week 2 - Text Analysis
Frontiers of Computational Journalism week 2 - Text Analysis
 
Frontiers of Computational Journalism week 3 - Information Filter Design
Frontiers of Computational Journalism week 3 - Information Filter DesignFrontiers of Computational Journalism week 3 - Information Filter Design
Frontiers of Computational Journalism week 3 - Information Filter Design
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems
 
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...
Big Data Analytics: Discovering Latent Structure in Twitter; A Case Study in ...
 
Why L-3 Data Tactics Data Science?
Why L-3 Data Tactics Data Science?Why L-3 Data Tactics Data Science?
Why L-3 Data Tactics Data Science?
 
Web services for supporting the interactions of learners in the social web - ...
Web services for supporting the interactions of learners in the social web - ...Web services for supporting the interactions of learners in the social web - ...
Web services for supporting the interactions of learners in the social web - ...
 
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
 
An Introduction to Information Retrieval and Applications
 An Introduction to Information Retrieval and Applications An Introduction to Information Retrieval and Applications
An Introduction to Information Retrieval and Applications
 
Project Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social NetworksProject Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social Networks
 
The Next Generation of AI-powered Search
The Next Generation of AI-powered SearchThe Next Generation of AI-powered Search
The Next Generation of AI-powered Search
 
Semantic Data Retrieval: Search, Ranking, and Summarization
Semantic Data Retrieval: Search, Ranking, and SummarizationSemantic Data Retrieval: Search, Ranking, and Summarization
Semantic Data Retrieval: Search, Ranking, and Summarization
 
Leveraging Semantic Parsing for Relation Linking over Knowledge Bases
Leveraging Semantic Parsing for Relation Linking over Knowledge BasesLeveraging Semantic Parsing for Relation Linking over Knowledge Bases
Leveraging Semantic Parsing for Relation Linking over Knowledge Bases
 
M2 l10 fairness, accountability, and transparency
M2 l10 fairness, accountability, and transparencyM2 l10 fairness, accountability, and transparency
M2 l10 fairness, accountability, and transparency
 

Similar a Complex Networks: Science, Programming, and Databases

Relationships Matter: Using Connected Data for Better Machine Learning
Relationships Matter: Using Connected Data for Better Machine LearningRelationships Matter: Using Connected Data for Better Machine Learning
Relationships Matter: Using Connected Data for Better Machine LearningNeo4j
 
Workshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceNeo4j
 
Social Semantic (Sensor) Web
Social Semantic (Sensor) WebSocial Semantic (Sensor) Web
Social Semantic (Sensor) WebDavid Crowley
 
Wimmics Research Team 2015 Activity Report
Wimmics Research Team 2015 Activity ReportWimmics Research Team 2015 Activity Report
Wimmics Research Team 2015 Activity ReportFabien Gandon
 
Ordering the chaos: Creating websites with imperfect data
Ordering the chaos: Creating websites with imperfect dataOrdering the chaos: Creating websites with imperfect data
Ordering the chaos: Creating websites with imperfect dataAndy Stretton
 
Big Data & Artificial Intelligence
Big Data & Artificial IntelligenceBig Data & Artificial Intelligence
Big Data & Artificial IntelligenceZavain Dar
 
Einstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data ScienceEinstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data ScienceNeo4j
 
PyData Texas 2015 Keynote
PyData Texas 2015 KeynotePyData Texas 2015 Keynote
PyData Texas 2015 KeynotePeter Wang
 
Decentralized AI for the Rest of Us
Decentralized AI for the Rest of UsDecentralized AI for the Rest of Us
Decentralized AI for the Rest of UsJesus Rodriguez
 
Data science meetup - Spiros Antonatos
Data science meetup - Spiros AntonatosData science meetup - Spiros Antonatos
Data science meetup - Spiros AntonatosSpiros Antonatos
 
Data science presentation
Data science presentationData science presentation
Data science presentationMSDEVMTL
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and PythonTravis Oliphant
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge GraphTrey Grainger
 
Large scale computing
Large scale computing Large scale computing
Large scale computing Bhupesh Bansal
 
Overview of the Research in Wimmics 2018
Overview of the Research in Wimmics 2018Overview of the Research in Wimmics 2018
Overview of the Research in Wimmics 2018Fabien Gandon
 
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...Mihai Criveti
 
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...ACTUONDA
 
Graphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningNeo4j
 
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014The Hive
 

Similar a Complex Networks: Science, Programming, and Databases (20)

Relationships Matter: Using Connected Data for Better Machine Learning
Relationships Matter: Using Connected Data for Better Machine LearningRelationships Matter: Using Connected Data for Better Machine Learning
Relationships Matter: Using Connected Data for Better Machine Learning
 
Workshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data Science
 
Social Semantic (Sensor) Web
Social Semantic (Sensor) WebSocial Semantic (Sensor) Web
Social Semantic (Sensor) Web
 
Wimmics Research Team 2015 Activity Report
Wimmics Research Team 2015 Activity ReportWimmics Research Team 2015 Activity Report
Wimmics Research Team 2015 Activity Report
 
Ordering the chaos: Creating websites with imperfect data
Ordering the chaos: Creating websites with imperfect dataOrdering the chaos: Creating websites with imperfect data
Ordering the chaos: Creating websites with imperfect data
 
Big Data & Artificial Intelligence
Big Data & Artificial IntelligenceBig Data & Artificial Intelligence
Big Data & Artificial Intelligence
 
Einstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data ScienceEinstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data Science
 
PyData Texas 2015 Keynote
PyData Texas 2015 KeynotePyData Texas 2015 Keynote
PyData Texas 2015 Keynote
 
Decentralized AI for the Rest of Us
Decentralized AI for the Rest of UsDecentralized AI for the Rest of Us
Decentralized AI for the Rest of Us
 
Data science meetup - Spiros Antonatos
Data science meetup - Spiros AntonatosData science meetup - Spiros Antonatos
Data science meetup - Spiros Antonatos
 
Data science presentation
Data science presentationData science presentation
Data science presentation
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and Python
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge Graph
 
Large scale computing
Large scale computing Large scale computing
Large scale computing
 
Overview of the Research in Wimmics 2018
Overview of the Research in Wimmics 2018Overview of the Research in Wimmics 2018
Overview of the Research in Wimmics 2018
 
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
DevOps for Data Engineers - Automate Your Data Science Pipeline with Ansible,...
 
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...
No more BITS - Blind Insignificant Technologies ands Systems by Roger Roberts...
 
Graphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine Learning
 
Lecture4 Social Web
Lecture4 Social Web Lecture4 Social Web
Lecture4 Social Web
 
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014
Agile Data Science by Russell Jurney_ The Hive_Janruary 29 2014
 

Último

wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...KarteekMane1
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfSubhamKumar3239
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Boston Institute of Analytics
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxSimranPal17
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxTasha Penwell
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksdeepakthakur548787
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...Dr Arash Najmaei ( Phd., MBA, BSc)
 
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024Susanna-Assunta Sansone
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesTimothy Spann
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
Decoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectDecoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectBoston Institute of Analytics
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxHimangsuNath
 

Último (20)

wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdf
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptx
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing works
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
 
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 
Insurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis ProjectInsurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis Project
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
Decoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectDecoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis Project
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptx
 

Complex Networks: Science, Programming, and Databases

  • 1. Complex Network:
 Science, Data Base, Programming  Mahdi Seyednezhad Ph.D. candidate Computer Science And CyberSecurity department Data scientist at Alstom, Florida Institute of Technology, Melbourne, Florida. sseyednezhad2013@my.fit.edu https://seyednejad.wixsite.com/home
  • 2. Mahdi Dr. Ronaldo Menezes • I am Seyed Mohammad Mahdi Seyednezhad. • Don’t worry! You can call me Mahdi/Mehdi. • I am working at Alstom as a data scientist. Biocomplex Lab. Who is Mahdi? !2
  • 3. My awesome talk plan! Data Science Complex Network Graph Database 3
  • 4. Data Science • Data science in academia 4
  • 5. Data Science – Industry expectations! • Data engineering • Data Acquisition • ETL (Extract, Transform & Load) • Data base management, Data warehousing • Feature engineering • Feature Extraction, Selection, Reduction • Machine Learning • Supervised, unsupervised, reinforcement • Time series, images, tables, text, ... • Data analytics • Statistical models • Structural models • Complex models Data science is a spectrum of skills and applications! 5
  • 6. What is a graph? • A graph is a discrete math modeling tool. • A graph has 2 main elements: • Node (Vertex) • Edge (Relation) • For example: • Graph (Network) of cities Orlando Melbourne Tampa Miami Jacksonville Edge Edge Edge Edge Edge 6
  • 7. Complex Network • A graph generated by real data is called “Network”. • In the context of network theory, a complex network is a graph (network) with non-trivial topological features—features that do not occur in simple networks such as lattices or random graphs but often occur in graphs modeling of real systems. A simple network A complex network 7
  • 8. Properties of a Network 8 Node1 Node3Node2 Degree(Node1)=2 Degree(Node2)=1 Degree(Node3)=1
  • 9. Why network science? • Let’s assume we have data of some people and tweets on Twitter. • Who is important? • We can count! • What relation is important? • Who is important by number of relations? • Who has attracted most attentions? • How does the relation between entities change? • It is easy to generalize to various applications. 9
  • 10. Who is involved with complex networks? • Physicists • Computer scientists  • Social Scientists • Biologists • Mathematicians • Industrial engineers • Economics 10
  • 15. Product Space •The product space created by C. Hidalgo. •It shows how complicated the products are. •It is a study in marketing and economics. 15
  • 16. 16
  • 17. The structure is important! We may want analytics independent of entities! 17
  • 19. The sequence reveals information 19
  • 20. Flow of Information Meme diffusion in online social media 20
  • 22. When should we use network sciences? • The structure is important! • The collective behavior matters! • The sequence reveals information. • Relation-based communities are desired. • The flow of information is important. • Epidemic should be monitored. • The graph model is suitable for the problem. 22
  • 23. 23
  • 24. Scientific Tools of Complex Networks • Strong nerve and good temper! • Python, R • Networkx (Python) • Easy and straight forward • Somehow slower • igraph (Python, R) • Staight forward • Somehow acceptable network visualization • Originally inplemented in C++ (a bit faster than Networkx) • graph-tool (Python) • Hard to use • Very nice network visualization • Contains most of the complicated network algorithms 24
  • 26. Let’s learn complex network through an example. 26
  • 27. It starts with a question? Sometimes it ends up to more meaningful questions! 27
  • 28. Start a project with a question/problem • It starts with a question. • Do people have the same kind of feelings? • Do people show their feeling in the same way all around the world? • Do we actually feel different when we talk about various topics? • Is it possible to group people based on their feeling? • The questions can explain the motivations. 28
  • 29. Data Data Data Data Data Data …… • We should find a good data set to address the questions. • Do you want more data? • Yes! Give me more data! 29
  • 30. Data in our project • How to identify the feelings? • Emojis! 😁 • Source of emojis? • Twitter! • Is it free? • Kinda! Enough for research. • Collect tweets in different topics! 30
  • 31. Create the network! To create a network two essential things should be clearly defined: • Node (Entity) • Edge (Relation) • In our project, each emoji is a node and the cooccurrence is the edge. Node1 Node2 Edge 31
  • 32. Network of Emojis What a beautiful day out! We are going to the beach Can’t believe these waves! #beachday 1 1 1 1 11 1 2 1 1 1 1 1 1 1 1 1 N-gram of the emojis in a tweet Combine the N-grams to create the co-occurrence directed weighted network of emojis !32
  • 33. Python code - Networkx • pip install networkx • Import networkx and create a graph instance • import networkx as nx • G=nx.Graph() • Add one node • G.add_node(1) • Add a list of nodes • G.add_nodes_from([2,3]) • Add one edge • G.add_edge(1,2) • Add a list of edges • G.add_edges_from([(1,2),(1,3)]) 33
  • 34. Create the adjacency matrix 34
  • 36. Call the function for different groups •The function def network_builder(group_1, key_based, key_text, out_graphml, emoji_list, tag) •Call it: net = network_builder(group, ‘emoji_List','emoji_position_in_text', file_graphml, emoji_list, tag=group[0]) 36
  • 37. Graph-tool • Good luck with installing graph-tool! • import graph_tool.all as gt 37
  • 38. Gt and stochastic block model 38
  • 39. Network of Emoji Stochastic Block model on the Organ data set. The emojis are chosen from the corresponding network randomly. !39 https://link.springer.com/chapter/10.1007/978-3-319-72150-7_67
  • 40. Word-emoji Network We found a semantic in emojis similar to the semantics of languages. We found out people are normally happy when they use emojis. https://www.aaai.org/ocs/index.php/FLAIRS/FLAIRS18/paper/viewPaper/17653
  • 41. After some mathematical analysis….. • The structure of the feeling is the same! • The way we show the feeling is different. • Similar to languages! 😉 !41
  • 42. Massive Data https://blog.equinix.com/blog/2016/08/01/speak-like-a-data-center-geek-big-data/ •Products/Users of Amazon •Users of Facebook or Twitter •Walmart Products •Users of a Cloud Service •Massive Text •Movies on Netflix 42
  • 43. Network Databases • There are many options for Graph-based databases. • Most of them are supported by main cloud services. • It is important that the graph data base tries to implement things in a graph model. • Some data bases just show you the data in a graph model! They do not store them as a graph! • Nowadays, big servers offer Graph DBMS along with the classic data base services. • The relation between our dates important. • It is really useful for realtime recommendation. 43
  • 44. Popular Graph DBMS's • Some of the famous graph data bases https://db-engines.com/en/ranking/graph+dbms 44
  • 45. Comparing Graph Databases Name Neo4j Microsoft Azure Cosmos DB OrientDB ArangoDB Janus Graph Amazon Neptune GraphDB Rank (G- DBMS) 1 2 3 4 6 8 DB model Graph Multi-model Multi-model Multi-model Graph Multi-model Multi-model Initial release 2007 2017 2010 2012 2017 2017 2000 Licence Open source Commercial Open source (Apache 2) Open source (Apache 2) Open source  (Apache 2) Commercial Commercial Server OS Linux 
 OS X
 Solaris
 Windows Hosted All OS with a Java JDK 6+ Linux
 OS X
 Raspbian
 Solaris
 Windows Linux
 OS X
 Unix
 Windows Hosted All OS with a Java VM
 Supported programmin g languuages .Net, Clojure
 Elixir, Go
 Groovy, Haskel l, Java, JavaScript
 Perl, PHP
 Python
 Ruby, Scala .Net
 C#
 Java
 JavaScript
 JavaScript (Node.js)
 Python .Net, C, C#,  C++, Clojure
 Java, JavaScript
 Node.js
 PHP, Python
 Ruby, Scala C#, Clojure
 Java
 JavaScript (Node.js)
 PHP, Python
 Ruby Clojure
 Java
 Python C#, Go
 JavaScript (Node.js)
 PHP
 Python
 Ruby, Scala .Net, Java
 C#, Clojure
 JavaScript (Node.js)
 PHP
 Python
 Ruby, Scala 45
  • 46. Who is using graph data bases? 46
  • 47. Neo4j - Cypher • Nodes are surrounded by parenthesis • () or (p) • Labels or tags start with’:’ and group nodes by roles or types • (p:Person:Mammal) • Nodes can have properties • (p:Person {name: ‘John’}) 47
  • 48. • Relationships are wrapped with hyphens or square brackets. • - -> or -[h:HIERD]-> • Direction od relation is specified “<“ and “>” • (p1)-[:HIERD]->(p2) • Relationship can have properties. • -[:HIERD {type: ‘contract’}]-> 48
  • 49. Neo4j, Python, Cypher • Jennifer likes graphs. //data stored with this direction CREATE (p:Person)-[:LIKES]->(t:Technology) //query relationship backwards will not return results MATCH (p:Person)<-[:LIKES]-(t:Technology) //better to query with undirected relationship unless sure of direction MATCH (p:Person)-[:LIKES]-(t:Technology) 49
  • 50. Cypher and Python from neo4jrestclient import client q = 'MATCH (u:User)-[r:likes]->(m:Beer) WHERE u.name="Marco" RETURN u, type(r), m' # "db" as defined before results = db.query(q, returns=(client.Node, str, client.Node)) for r in results: print("(%s)-[%s]->(%s)" % (r[0]["name"], r[1], r[2]["name"])) # The output: # (Marco)-[likes]->(Punk IPA) # (Marco)-[likes]->(Hoegaarden Rosee) • https://marcobonzanini.com/2015/04/06/getting-started-with-neo4j-and-python/ 50
  • 51. Neo4j - Python • First, install Neo4j server. • Neo4j Python driver • It is officially supported by Neo4j and connects to the database using the binary protocol. It aims to be minimal, while being idiomatic to Python • pip install neo4j • Py2neo • It is a client library and comprehensive toolkit for working with Neo4j from within Python applications and from the command line. It has been carefully designed to be easy and intuitive to use. • pip install py2neo • neomodel • An Object Graph Mapper built on top of the Neo4j python driver. Familiar Django style node definitions with a powerful query API, thread safe and full transaction support. • pip install neomodel 51
  • 52. Important Complex Network Conferences • Complenet • International Conference on Complex Networks • Exeter, UK (2020) • Complex Networks • International Conference on Complex Networks and their Applications • December 10-12, 2019 - Lisbon, Portugal. • Netsci • INTERNATIONAL SCHOOL AND CONFERENCE ON NETWORK SCIENCE • 27 May 2019 - 31 May 2019, Burlington, United States 52