Lecture 2 - Graph Representation PDF
Document Details
Uploaded by FunMoldavite5200
Stanford University
Dr. Reem Essameldin Ebrahim
Tags
Related
- TD n°1 : Types de variables et représentation des données - Statistiques 2024
- Lecture 9: Graph Algorithms and Dynamic Programming PDF
- Chapter 3 Search Algorithms for Problem Solving PDF
- Data Collection & Sampling Techniques PDF
- Stanford CS224W: Machine Learning with Graphs PDF
- CSC301 Lecture 10 Slides PDF
Summary
This is a lecture on graph representation, focusing on social networks, and mathematical techniques within the broader field of social network analysis. It discusses the concepts from social network theory and how to measure various network properties.
Full Transcript
02. Network Representation Lecturer: Dr. Reem Essameldin Ebrahim Introduction to Social Networks Based on CS224W Analysis of Networks Mining and Learning with Graphs: Stanford University Copyright © Dr. Reem Essameldin 2023-2024...
02. Network Representation Lecturer: Dr. Reem Essameldin Ebrahim Introduction to Social Networks Based on CS224W Analysis of Networks Mining and Learning with Graphs: Stanford University Copyright © Dr. Reem Essameldin 2023-2024 From Relationships to Graphs SNA Taxonomy Way to graph Networks Graph Representation In this Lecture How do you define a Network? Topics to be covered are: Different Types of Networks From relationships to graphs Traditionally, sociologists have studied relationships using a variety of observational strategies, both qualitative, such as interviews, and statistical, such as those based on the social survey. However, beginning in earnest in the 1950s, sociologists began to make concerted use of mathematical techniques from a branch of pure mathematics called graph theory and a branch of applied mathematics called matrix algebra to develop scientific models of social relationships and to come up with measures connecting key concepts from social theory, such as roles, prominence, and prestige, to tangible empirical evidence. From relationships to graphs Traditionally, sociologists have studied relationships using a variety of observational strategies, both qualitative, such as interviews, and statistical, such as those based on the social survey. Figure shows the Zachary karate club network study was one of the first data collection projects in the history of SNA. The data are famous for showing how networks could be used to find groups based on the relations between actors. Social Network Analysis Social network analysis has two broad aspects. 1 Network Theory Social Network Analysis (SNA) is about figuring out how networks work and what networks do to and for people. In essence, social network theories are Social Network Social Network general statements about how people Theory Measurements behave in networks and how networks themselves “behave”"; that is where network relations come from, what they Structure Strength of do, and what consequences they have for Degree Network Holes weak ties Centrality Density the people involved. For instance, the idea of social capital that is, that the Figure: The two faces of Social Network Analysis connections that you have to others can bring you certain types of benefits, is part of network theory. Copyright © Dr. Reem Essameldin 2023-2024 Social Network Analysis Social network analysis has two broad aspects. 2 Network Measurement Social Network Analysis (SNA) is another branch of social network analysis deals with how to measure various network properties. It links social Social Network Social Network network concepts to some type of Theory Measurements mathematical representation. Since this branch of network analysis deals with measurement, it is where mathematics Structure Strength of and other forms of quantitative Degree Network Holes weak ties Centrality Density representation of networks (such as matrices). Figure: The two faces of Social Network Analysis Copyright © Dr. Reem Essameldin 2023-2024 Social Network Analysis Social network analysis has two broad aspects. 2 Network Measurement Social Network Analysis (SNA) is another branch of social network analysis deals with how to measure various network properties. It links social Social Network Social Network network concepts to some type of Theory Measurements mathematical representation. Since this branch of network analysis deals with measurement, it is where mathematics Structure Strength of and other forms of quantitative Degree Network Holes weak ties Centrality Density representation of networks (such as matrices). Figure: The two faces of Social Network Analysis Social Network Analysis (SNA) is the use of graph-theoretic and matrix algebraic techniques to study social structure and social relationships. Copyright © Dr. Reem Essameldin 2023-2024 Why Math?! If math scares you, don’t worry. The beauty of math, is that it allows us to take some fuzzy social science concepts, stated in natural language, such as the idea of “popularity” or “social position” or “strength of connection” and give it a precise representation. That way we can use networks to learn about what makes the social world go round or predict why some people, organizations, or even whole countries are successful and others are not (among other things). Networks are not given to us They have to be constructed Copyright © Dr. Reem Essameldin 2023-2024 Way to graph it Define a relationship When analyzing a social network, it is important to first understand what type of social relationship you are analyzing, as it relates directly to what type of conclusions or generalizations you can make about the social world. Bound the context Once you have a type of social relationship you would like to examine, the next step is to bound the context. Bounding, or to draw boundaries, is to have a rule about what will or will not be included in the study. Way to graph it Define a relationship Essentially, a relationship is a connection between at least two social actors. For example, you are likely enrolled in a social network’s class if you are reading this, and have people you know such as your friends and people you’ve taken prior classes with, but also people you’ve never seen before. It might be obvious that you have a relationship with those people that you know, but do you have a relationship with those you do not know? The answer is maybe. It depends on how you define the term social relationship. The word “classmate” even implies a relationship type, one with a different social meaning than “friend.” Way to graph it Define a relationship Bound the context (choose proper representation) The important of this step is because of the following: Its impossible to map all relationships existed in the world. To exclude relationships that are not meaningful for your study. For example, If you connect all papers with the same word in the title, what will you be exploring? It is a network, nevertheless. With a type of social relationship in some bounded context, you can begin to map the social world as a graph. Network or Graph? Networks/Graphs are a collection of objects where some pairs of objects are connected by links. Network Graph often refers to real systems such is a mathematical representation of as the web, social networks and a network such as web graph and metabolic networks. social graph (by Facebook). The World Wide Web (WWW) is a is a network of is the sum of all network of web individuals linked by chemical reactions documents linked family, friendship or that take place in a by URLs. professional ties. cell. Network or Graph? Networks/Graphs are a collection of objects where some pairs of objects are connected by links. Network Graph often refers to real systems such is a mathematical representation of as the web, social networks and a network such as web graph and metabolic networks. social graph (by Facebook). Language (Key Terms) Language (Key Terms) Network Graph Node Vertex Link Edge In most cases we will use the two terms interchangeably Graph Representation A network is a catalogue of a system components often called nodes or vertices and the direct interactions between them, called links or edges.. Components of a Network: Objects: nodes, vertices 𝑁 Interactions: links, edges 𝐸 System: network, graph 𝐺 (𝑁, 𝐸) To understand a complex system, we need to understand the mathematics behind it. Graph Representation In its most basic form, a graph is essentially a picture of the relationships between different types of social actors. This picture becomes incredibly powerful when we begin to use mathematical concepts to understand how actors relate to each other. The Mathematical Definition A graph is a set, usually represented by the capital letter 𝑮 , containing two sets as its members: a set of nodes (usually represented by the capital letter ) and a set of edges (usually represented by the capital letter E). In formal notation: 𝑮 = (𝑵, 𝑬) Graph Representation In its most basic form, a graph is essentially a picture of the relationships between different types of social actors. This picture becomes incredibly powerful when we begin to use mathematical concepts to understand how actors relate to each other. Simple Example This Figure shows an example of a graph with three nodes and two edges. Nodes A, B, and C are circles representing actors A, B, and C. The simple lines drawn between A and B (i.e. AB) and likewise between B and C are edges indicating the presence of a relationship. The lack of an edge between nodes A and C reflects the absence of a relationship between actors named A and C. Netwroks: Common Language Hollywood actor Relationship network: two network: two actors are persons are connected if they connected if they played in the are having some same movie. kind of relationship with each other. Protein network: While the nature of two proteins are the nodes and the connected if an links differs, these experimental networks have the evidence existed same graph representation, consisting of 4 nodes and 4 links. Determine Graph Structure What are the nodes? What are the edges? Choice of network representation While nodes and edges are the building blocks of a graph, the types of relationships that the edges represent can change both How do you define a how we understand the network conceptually and also what Network? mathematical techniques we can apply to the graph. The way you assign links will determine the nature of the question you can study. Choice of Netwrok Representation Types of Networks The links of a network can be directed or undirected. Undirected Directed Social networks composed of Social networks composed of symmetric, reciprocal ties are asymmetric, non- reciprocal ties represented using undirected are represented using a directed graphs. graph. Types of Networks The links of a network can be directed or undirected. Undirected Directed Social networks composed of Social networks composed of symmetric, reciprocal ties are asymmetric, non- reciprocal ties represented using undirected are represented using a directed graphs. graph. You have the symmetric tie One member of the pair can with every other student claim to have a particular type By definition the relation Only asymmetric ties may have the taking this course this term. In of social relationship with the “spending time together” property of being non-reciprocal or having this sense, all co-memberships other, but it is possible lacks any inherent more or less reciprocity. (e.g. if I treat you (e.g., being in the same club or (although not necessary) that directionality. Mutuality (or with respect, will you also treat me with organization or being part of the other person fails to have reciprocity) is built in by respect? ). Reciprocity is at a maximum the same family) create the same relationship with the construction. when the content of the relationship is symmetric ties among all first. (e.g. sentiment relations, equally exchanged between actors. actors involved. such as like/dislike. Types of Networks The links of a network can be directed or undirected. Undirected Directed Social networks composed of Social networks composed of symmetric, reciprocal ties are asymmetric, non- reciprocal ties represented using undirected are represented using a directed graphs. graph. Examples of systems have undirected links Examples of systems have directed links Collaborations. Phone Calls: one person calls the other. Friendship on Facebook. Following on Twitter (newly named X). Transmission Lines: electric current WWW: URLs point from one web document to the other. can flow in both directions. Undirected vs Directed Graphs Network maps and their basic properties. Undirected Networks A network is called undirected if ALL of its links are undirected (symmetrical, reciprocal). Types of Networks The Mathematical Definition A simple graph 𝑮 = (𝑽, 𝑬) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. For each 𝒆 ∈ 𝑬, 𝒆 = {𝒖, 𝒗} where 𝒖, 𝒗 ∈ 𝑽. An edge e is a loop if 𝒆 = {𝒖, 𝒖} for some 𝒖 ∈ 𝑽. Undirected Networks A network is called undirected if ALL of its links are undirected (symmetrical, reciprocal). Types of Networks Simple Example The given Figure shows a undirected graph, represents a network of people who spend time together. It would be nonsensical for a person (say A) to claim that they spend time with another person (say B) and for B to say that they do not spend time with A. In terms of network theory, this means that if we know that the relationship (R) linking two nodes A and B is symmetric, then only a single edge exists that links them, and it does not matter whether we call this edge AB or BA. Directed Networks A network is called directed (or digraph) if ALL of its links are directed (arcs). Types of Networks The Mathematical Definition A directed graph 𝑮 = (𝑽, 𝑬) consists of a set 𝑽 of vertices and a set E of edges that are ordered pairs of elements in V. For each 𝒆 ∈ 𝑬, 𝒆 = (𝒖, 𝒗) where 𝒖, 𝒗 ∈ 𝑽. An edge 𝒆 is a loop if 𝒆 = (𝒖, 𝒖) for some 𝒖 ∈ 𝑽. A simple (undirected) graph is just like a directed graph, but with no specified direction of its edges. Directed Networks A network is called directed (or digraph) if ALL of its links are directed (arcs). Types of Networks Simple Example The given Figure shows an advice network. We could say that C seeks advice from E, but E does not seek advice from C. This may be because E is higher in the office hierarchy or is more experienced than C. Thus, in a directed graph, for every edge, there is a source node and a destination node. So in the case of “A likes B” the source node is A and the destination node is B. In the case of “B likes A” the source node is B and the destination node is A. Types of Networks The links of a network can be unweighted or weighted. Unweighted Weighted Our understanding of relationships It may be socially meaningful to have centered around their consider relationships in terms of existence or absence(binary). their intensity or frequency- or the “strength” of the tie. People might have many friends, and friendship ties can be turned into graphs. However, people often have different types of friends, and some friends are more important than others. Weighted Networks A network whose links have a defined weight, strength or flow parameter. Types of Networks Simple Example The given Figure shows a text message or emailing network between a set of friends or coworkers at a company, the numbers can be thought of as the frequency of communication. Actors A and C communicate frequently, with C sending messages to A a little more often than A send messages to C. However, C sends messages to B half as frequently as C sends messages to A. Types of Networks The links of a network can be self-looped or Multigraph. Self-Loop Multigraph Multigraph examples: social networks, where we distinguish friendship, family and professional ties. In some systems self-interactions Nodes are permitted to have are allowed; in such networks, multiple links (or parallel links) self-loops represent the fact that between them. node 𝑖 interacts with itself. Types of Networks The links of a network can be self-looped or Multigraph. Self-Loop Multigraph In some systems self-interactions Nodes are permitted to have are allowed; in such networks, multiple links (or parallel links) self-loops represent the fact that between them. node 𝑖 interacts with itself. Examples: Examples: WWW - Hyperlink. Collaboration. Protein interactions. Social networks, where we distinguish friendship, family and professional ties..