the java universal network/graph ... -...
TRANSCRIPT
http://jung.sourceforge.net
The Java Universal Network/Graph Framework (JUNG):A Brief Tour
Joshua O’Madadhain (UCI)
Danyel Fisher (MSR), Tom Nelson (RABA Technologies)Scott White (UCI), Yan-Biao Boey (UCI)
http://jung.sourceforge.net
What’s it for?
phenomenae pertaining to relationships/links collaborations, citations/hyperlinks, email,
biological systems, friendships, telecom networks, ecological and biological systems, Markov processes, Bayes nets...
SUNBELT 2000 270 People & Structural Holes Database to UCINET to Pajek to MAGE
http://jung.sourceforge.net
Programmatic Solution
ProgrammableMake it easy to do the same thing again
ExtensibleIf you need a new routine, you can put it in yourself
LibraryCan be used in a server, a client, or as part of a
larger application Open Source
Take it apart and put it together some other wayFree!
http://jung.sourceforge.net
What is JUNG?
Framework for the modeling, analysis, and visualization of graphs in Java
supports most types of graphs/networks separate, flexible visualization framework rich attribute structure (metadata) network event handling predicates (subsets, constraints, filtering, ...) extensive (and growing!) library of algorithms
http://jung.sourceforge.net
Dependencies
Java (1.4.2+) Commons-Collections API (3.1)
http://jakarta.apache.org/commons/collections/Predicate, set operations, wrappers, data types (BidiMap)
CERN Colt API (1.2.0)http://dsd.lbl.gov/~hoschek/colt/matrix operations, statistics
Xerces (2.6.2)http://xml.apache.org/xerces2-j/index.htmlXML parsing
http://jung.sourceforge.net
Overview
Creating a graph Annotating with data Filters Graph drawing Algorithms Demo
http://jung.sourceforge.net
Creating a graph
Load from a file - Pajek - GraphML (XML)
Build from scratch- Create vertices individually- Specify edges
Generate from an algorithm/model- Small-world graphs- Power-law graphs
http://jung.sourceforge.net
Graph Types
AbstractArchetypeGraph
AbstractSparseGraph
ArchetypeGraph
GraphHypergraph
SparseGraph
DirectedSparseGraphUndirectedSparseGraph
UndirectedGraph DirectedGraph
HypergraphBPG
KPartiteGraph
KPartiteSparseGraph
abstract class
interface
instantiable class
KEY
A B
B implements A
A B
B extends A
http://jung.sourceforge.net
Vertex Types
ArchetypeVertex
Hypervertex VertexAbstractHyperUnitBPG
AbstractSparseVertexHypervertexBPG
SimpleSparseVertex(mixed)
SimpleDirectedSparseVertex(directed)
SimpleUndirectedSparseVertex(undirected)
SparseVertex(mixed, parallel)
DirectedSparseVertex(directed, parallel)
UndirectedSparseVertex(undirected, parallel)
LeanSparseVertex(mixed, parallel)
abstract class
interface
instantiable class
KEY
A B
B implements A
A B
B extends A
http://jung.sourceforge.net
Edge Types
ArchetypeEdge
EdgeHyperedge
DirectedEdge UndirectedEdge
AbstractHyperUnitBPG
AbstractSparseEdge
DirectedSparseEdge UndirectedSparseEdge
HyperedgeBPG
abstract class
interface
instantiable class
KEY
A B
B implements A
A B
B extends A
http://jung.sourceforge.net
Creating a Graph
Graph g = new DirectedSparseGraph();Vertex v1 = new SparseVertex();Vertex v2 = new SparseVertex();g.addVertex( v1 );g.addVertex( v2 );Edge e = new Edge( v1, v2 );g.addEdge( e );
http://jung.sourceforge.net
Adding user-defined data key-value pairs associated with
graphs, edges, vertices easy to write algorithms that operate on
relational data
String name = vertex.getUserDatum(NAME);edge.setUserDatum(DATE, new Date());
http://jung.sourceforge.net
Copying and Equality
copies of vertices and edges are “equal to” the originals – equals(), hashCode()
– subgraphs– allows experimentation with mutations to
graph, without affecting original
v2 = v1.getEqualVertex(g2)
http://jung.sourceforge.net
Predicates
logical expressions, e.g.v.degree() > 4e instanceof DirectedEdge
can be used to define subsets and constraints – k-partite graphs– multigraphs, simple graphs, trees, mixed-
mode graphs, hypergraphs, ...
http://jung.sourceforge.net
Using graph filters
Extract subgraphs of vertices and edges– All edges with user-data “weight” > 0.2– All nodes whose “location” is “California”– All nodes within distance 3.5 of v
Chain filters together Automate complex graph
transformations
http://jung.sourceforge.net
Visualizing graphs Basic layout algorithms:
– Fruchterman-Rheingold– Kamada-Kawaii– Eades– Self-Organizing Maps
Plug and play architecture- Drop in your favorite renderer, layout
Provided rendering engine is Swing-based - (but layouts are generic)
http://jung.sourceforge.net
Simple Graph Display
to display an existing graph:l = new FRLayout(g);r = new PluggableRenderer();vv = new VisualizationViewer(l,r);jpanel.add(vv);
now, start customizing...
PluggableRenderer
http://jung.sourceforge.net
Customizing
Layout algorithms specify vertex positionsadvancePositions()
Renderers draw vertices and edges.paintEdge( g, Edge, x1, y1, x2, y2 )paintVertex( g, Vertex, x, y )
http://jung.sourceforge.net
Algorithms
clustering k-neighborhood
connected components
k-means clustering
connectivity
maximum flow
network distances
structural equivalence
centrality/importancebetweenness,markov,PageRank, hubs-and-authorities,voltage,...
bold text
show undirected edge arrows
show edge weights
edge weight highlighting
vertex degree ratio stretch
vertex voltage size
vertex degree shapes
show vertex ranks (voltages)
vertex selection stroke highlighting
vertex seed coloring
ranking
M Pazzani
M Fernandez O Mangasarian
M Hearst
M Jordan
C Lai
T Richardson
C Meek
C Glymour
P Sabes
J FrankP Cheeseman
J Stutz
M Wellman
D Cohn
A Smith
B Draper
J Erickson
C Brodley
P Smyth
J Weber
J Malik
D Heckerman
A Jones
E Knill
B Bollobas
G Das
D Gunopulos
H Mannila
S Teng
D Mitchell
R Khardon
D Roth
A Raftery
D Madigan
J Hoeting M Kersten
O Miglino
K Nafasi
C Taylor
D Wolpert
W Macready
A Hill
T Cootes
Z Ghahramani
S Dumais
P Chan
S Soatto
P Perona
R FrezzaG Picci
M Mitchell
T Jaakkola
D Haussler
P Orponen
K Murphy
H GreenspanS Belongie
R Goodman
M Holsheimer
J Matousek
L Xu
M Paterson
M KlemettinenH Toivonen
A Weigend
S Jung
J Boulicaut
S CasadeiS Mitter
J Adams
J Kosecka
R Paul
A Farquhar
R Kohavi
M Jaeger
J Ostrowski
K Bennett
A Ng
P Ronkainen
L Guibas
B Dom
M Sahami
J Bouguet
J Rice
D Dobkin
D Eppstein
T Hastie
P Agarwal
E Ukkonen
G OvertonJ Aaronson
J Haas
Z Wang
D Hart
G Gottlob
P Stolorz F Yao
A Robertson
E Horvitz
S Singh
B Fischer
T Leung
H AhonenO Heinonen
P Kilpelainen
M Atkinson
D Peel
G Miller
S Russell
W Buntine
J Fortes
L Saul
M Dillencourt
Y Weiss
C Volinsky
R Kronmal
A Gray
S Hanks
V Tsaoussidis
H Badr
D Kriegman
T Lane
J Gilbert
P Debevec
J Kivinen
J Crowcroft
R Beigel
A Mayer
B MacLennan
G Edwards
C Matheus
G Piatetsky-Shapiro
D McNeill
P Utgoff
R Fikes
R Jacobs
M Weber
J Gavrin
K Chang
D Hirschberg
E Hunt
S MacDonell
Z Galil
E Weydert
D Thomas
M Henzinger
M Burl
M Bern
P Sozou
J Graham
E DemaineM Demaine
S Spence
D Geiger
M Friedl
T Eiter
E Alpaydin
S Solloway
C Hutchinson
J WatertonD Cooper
A Barto
E Nikunen
E Dimauro
G LindenA Verkamo
I Verkamo
L Goncalves
G Cooper
A Newton
R Kraft
J Breese
N Amenta
I Cadez
C McLaren
G McLachlan
G Barequet
M Meila
Q Morris
Y Song
S Andersson
M Perlman
P Bradley
U Fayyad
D WolfG Italiano
K Tumer
E Keogh
E BernardoE Ursella
C Triggs
D Sornette
E Friedman
L DaynesT Printezis
T Pressburger
B Tuttle
J Haslam
G PageC Jackson
C Bishop
D Pavlov
M Dickerson
N de Freitas
C Stauss
R Kilgour
R Manduchi
G Graefe
R Shachter
K MosurskiR Almond
D Young
A Lapedes
R Blasi
D ChickeringR Giancarlo
K Wheeler
A Lanitis
P Prado
X Ge
S Payandeh
M Ghil
K Ide
H King
I Dryden
B Thiesson
D Pregibon
A KorholaH Olander
W Pratt
R Engelmore
A Brett
C Sayers
J Mao
M Salmenkivi
A Mamdani
J Iv
M Welling
B Kanefsky
W Taylor
C Strauss
K Walker
M Faghihi
E Di Bernardo
P Kube
K Rommelse
D Rumelhart
S GaffneyC ReinaS ChaudhuiriP Sallis
K LaaksoB Levidow
D Donnell
M Tartagni
M Vanter
N Lawrence
C FowlkesJ Roden
G Ridgeway
E Kuo
L Su
M Munich
D GolinelliG Consonni
D Cunliffe
D PsaltisG Steckman
P Courtier
M Latif
I Sim
L Cordero
L Ugarte
K Pentikousis
N Kapadia
J seck
F Lott
D Chudova
P Yiou
W Einhauser
P VetterS Goodbody
M Kawato
P Hrensen
M Levitz
clustering
http://jung.sourceforge.net
Event Handling
addition/removal of vertices/edges– graphs generate events
modification of user data repository– (JUNG) objects generate events
mouse events– can be parsed as selection, panning, zooming,
pop-ups, property changes, functions, ...
objects can register as listeners
http://jung.sourceforge.net
Statistical Analysis
Graph measures:– Degree distributions– Average shortest path length, diameter– Clustering coefficients
can use existing Java statistical packages CERN Colt Scientific Library Visual Numeric’s JMSL for Java
http://jung.sourceforge.net
Conclusion
Provides a common language for graphs Complements rather than replaces other
graph packages/network tools A powerful framework for working with
graphs with rich attribute structure Ideally suited for building tools/
applications related to network exploration and data mining
http://jung.sourceforge.net
Adoption
Users are writing social network analyses, games, animated
graph views, transportation network algorithms, Google Cartography, ...
Email visualization
Newsgroup Networks
Temporal Egocentric Communication Networks
Open-SourceCollaboration
LiveJournal networks
http://jung.sourceforge.net
Integrated into an application
http://jung.sourceforge.net
Freeman’s Southern Women
Shortest Path
http://jung.sourceforge.net
Demo
Betweenness Centrality
http://jung.sourceforge.net
Small Multiples[Sun, E1]
http://jung.sourceforge.net
Thanks
http://jung.sourceforge.net
Feel free to just play with it…Or join us! Active collaboration is
welcome.
Supported in part by NSF.