
12 Relations Jacobs University Visualization and Computer Graphics Lab Recall Jacobs University Visualization and Computer Graphics Lab Data Analytics 470 Recall • Data samples may have – unilateral relations, –bilateral relations, or – hierarchical relations. Jacobs University Visualization and Computer Graphics Lab Data Analytics 471 12.1 Representing Relations Jacobs University Visualization and Computer Graphics Lab Representing relations • Hierarchical relation: Tree • Unilateral relation: Directed graph • Bilateral relation: Undirected graph Jacobs University Visualization and Computer Graphics Lab Data Analytics 473 Representing trees • Traversing a (rooted) tree requires us to know about the hierarchical relationships of their nodes. • Relationships can be stored by using pointers. Jacobs University Visualization and Computer Graphics Lab Data Analytics 474 Binary trees • Binary trees T have an attribute T.root. •They consist of nodes x with attributes x.parent (short x.p), x.left, and x.right (in addition to x.key). Jacobs University Visualization and Computer Graphics Lab Data Analytics 475 d-ary trees • d-ary trees are rooted trees with at most d children per node. • They can be handled analogously to binary trees. Jacobs University Visualization and Computer Graphics Lab Data Analytics 476 Rooted trees with arbitrary branching • Rooted trees T with arbitrary branching consist of nodes x with attributes x.p, x.leftmost-child, and x.right-sibling (in addition to x.key). Jacobs University Visualization and Computer Graphics Lab Data Analytics 477 Directed Graph Definition: • A directed graph (digraph) G=(V,E) is an ordered pair consisting of – a set V of vertices and –a set E c VxV of edges. • In an undirected graph G=(V,E), the edge set E consists of unordered pairs of vertices. Jacobs University Visualization and Computer Graphics Lab Data Analytics 478 Number of edges • In a graph, the number of edges is bound by |E| = O(|V|2). • If G is connected, then |E| ≥ |V| - 1. • Hence, for a connected graph we get lg |E| = Θ (lg |V|). Jacobs University Visualization and Computer Graphics Lab Data Analytics 479 Adjacency matrix Definition: • The adjacency matrix of a graph G=(V,E) with V={1,…,n} is the nxn matrix A given by Dense representation: Storage requirements are Θ(|V|2). Example: Jacobs University Visualization and Computer Graphics Lab Data Analytics 480 Adjacency list Definition: • An adjacency list of a vertex v є V is the list Adj[v] of vertices adjacent to v. Example: Sparse representation: • Storage requirements for Adj[v] is Θ(|outgoing edges from v|). • Storage requirement for Adj[v] for all v є V is Θ(|E|). • Overall storage requirement is Θ(|V|+|E|). Jacobs University Visualization and Computer Graphics Lab Data Analytics 481 Examples for undirected & directed graph Jacobs University Visualization and Computer Graphics Lab Data Analytics 482 Application example: Neighboring states Jacobs University Visualization and Computer Graphics Lab Data Analytics 483 12.2 Graph Analysis Jacobs University Visualization and Computer Graphics Lab Graph topology • Graphs may exhibit different topological structures. • Based on their topological properties, one can distinguish different types of graphs (or networks). Jacobs University Visualization and Computer Graphics Lab Data Analytics 485 Fully connected graph Jacobs University Visualization and Computer Graphics Lab Data Analytics 486 Random network Number of nodes Degree Jacobs University Visualization and Computer Graphics Lab Data Analytics 487 Small-world network A small-world network is defined to be a network where the typical distance between two randomly chosen nodes grows proportionally to the logarithm of the number of nodes in the network. Jacobs University Visualization and Computer Graphics Lab Data Analytics 488 Scale-free network A scale-free network is a network whose degree distribution follows (asymptotically) a power law. Jacobs University Visualization and Computer Graphics Lab Data Analytics 489 Hierarchical network Jacobs University Visualization and Computer Graphics Lab Data Analytics 490 Modular network A modular network is one that consists of highly connected subgraphs that are connected with a few edges. Jacobs University Visualization and Computer Graphics Lab Data Analytics 491 Real-world networks • We can observe that real-world networks also exhibit similar structures. Jacobs University Visualization and Computer Graphics Lab Data Analytics 492 Real-world examples Neural Network (C. Elegans) Jacobs University Visualization and Computer Graphics Lab Data Analytics 493 Real-world examples Food Web Jacobs University Visualization and Computer Graphics Lab Data Analytics 494 Real-world examples Metabolic Network Jacobs University Visualization and Computer Graphics Lab Data Analytics 495 Real-world examples Genetic Regulatory Network Jacobs University Visualization and Computer Graphics Lab Data Analytics 496 Real-world examples Bank Network Jacobs University Visualization and Computer Graphics Lab Data Analytics 497 Real-world examples Airline Routes Jacobs University Visualization and Computer Graphics Lab Data Analytics 498 Real-world examples US Power Grid Jacobs University Visualization and Computer Graphics Lab Data Analytics 499 Real-world examples Internet Jacobs University Visualization and Computer Graphics Lab Data Analytics 500 Real-world examples Social Network Jacobs University Visualization and Computer Graphics Lab Data Analytics 501 Real-world examples World Wide Web (small part) Jacobs University Visualization and Computer Graphics Lab Data Analytics 502 Real-world examples part of WWW Number of nodes Number of nodes Degree Degree Jacobs University Visualization and Computer Graphics Lab Data Analytics 503 Topological features • We observe that the different topological properties lead to certain topological features. Jacobs University Visualization and Computer Graphics Lab Data Analytics 504 Hubs Jacobs University Visualization and Computer Graphics Lab Data Analytics 505 Modules Jacobs University Visualization and Computer Graphics Lab Data Analytics 506 Motifs Motifs are local network properties, which are defined as recurrent and statistically significant sub- graphs or patterns. Jacobs University Visualization and Computer Graphics Lab Data Analytics 507 Network metrics Jacobs University Visualization and Computer Graphics Lab Data Analytics 508 12.4 Graph Visualization Jacobs University Visualization and Computer Graphics Lab Graphs •Goal: – Visualize unilateral or bilateral relations. • Approach: – Use a graph layout consisting of nodes and links. • Spatial constraints: –None. • Design optimizations: – Penalize node cluttering. – Penalize edge crossing. – Penalize long edges. – Optimize screen space usage. Jacobs University Visualization and Computer Graphics Lab Data Analytics 510 Example • Social network visualization: Jacobs University Visualization and Computer Graphics Lab Data Analytics 511 Force-directed layouts • The most commonly used layout algorithm for graph layouts are force-directed layouts. • They iteratively try to minimize a given energy function. • Any design goal can be embedded into the energy function. • Typically, connected nodes attract each other up to a certain distance and too close nodes repel each other. • The approach is easy to implement. • However, special care needs to be taken for the algorithm to converge. • The solution highly depends on the start configuration. • The solution typically represents a local minimum of the energy function Jacobs University Visualization and Computer Graphics Lab Data Analytics 512 Force-directed layouts •Example: Eades – Use Hooke‘s law: F = D(x – x0) where is x0 the equilibrium. – Compute attracting forces for connected nodes (edge-based) – Compute repelling forces for all nodes (node-based) – Accumulate forces for each node, then apply accumulated forces to all nodes to compute new positions. – Iterate Jacobs University Visualization and Computer Graphics Lab Data Analytics 513 Force-directed layouts •Result: Jacobs University Visualization and Computer Graphics Lab Data Analytics 514 Adjacency matrices • For many relations, a graph visualization may get cluttered (even when using a suitable layout algorithm). • An alternative is to visualize unilateral or bilateral relationships using adjacency matrices. Jacobs University Visualization and Computer Graphics Lab Data Analytics 515 Adjacency matrices • Adjacency matrices draw all nodes in a given order on a horizontal and a vertical axes. • This describes a 2D matrix. • The respective pixel in the 2D matrix is filled, if there is a link between the respective nodes. Jacobs University Visualization and Computer Graphics Lab Data Analytics 516 Graph vs. adjacency matrices Jacobs University Visualization and Computer Graphics Lab Data Analytics 517 Graph vs. adjacency matrices Jacobs University Visualization and Computer Graphics Lab Data Analytics 518 Order of utmost importance Jacobs University Visualization and Computer Graphics Lab Data Analytics 519 Hybrid visualization Jacobs University Visualization and Computer Graphics Lab Data Analytics 520 12.5 Visual Encoding of Hierarchies Jacobs University Visualization and Computer Graphics Lab Hierarchical data • Hierarchical data refers to any data that can be stored in the data structure of a tree. • No further assumptions are made. • Frequently, a number of attributes are associated with each data sample. • Hence, we have a set of data samples
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages102 Page
-
File Size-