The Java Universal Network/Graph Framework ( JUNG ) : Joshua O ...

antlertextureSoftware and s/w Development

Jul 14, 2012 (5 years and 1 month ago)

432 views

http://jung.sourceforge.net
The Java Universal Network/Graph
Framework (JUNG):
A
Brief
T
our
Joshua O’Madadhain (UCI)
Danyel Fisher (MSR),
T
om Nelson (RABA

T
echnologies)
Scott White (UCI),
Y
an-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...

SUNBEL
T
2000

270 People & Structural Holes

Database
to
UCINET

to
Pajek
to
MAGE
http://jung.sourceforge.net
Programmatic Solution

Programmable
Make it easy to do the same thing again

Extensible
If you need a new routine, you can put it in yourself

Library
Can be used in a server
, a client, or as part of a
larger application

Open Source
T
ake it apart and put it together some other way
Free!
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, fl
exible visualization framework

rich attribute structure (metadata)

network event handling

predicates (subsets, constraints, fi
ltering, ...)

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.html
XML
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 fi
le
- 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
T
ypes
AbstractArchetypeGraph
AbstractSparseGraph
ArchetypeGraph
Graph
Hypergraph
SparseGraph
DirectedSparseGraph
UndirectedSparseGraph
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
V
ertex
T
ypes
ArchetypeVertex
Hypervertex
Vertex
AbstractHyperUnitBPG
AbstractSparseVertex
HypervertexBPG
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
T
ypes
ArchetypeEdge
Edge
Hyperedge
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-defi
ned 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 af
fecting original
v2 = v1.getEqualVertex(g2)
http://jung.sourceforge.net
Predicates

logical expressions, e.g.
v.degree() > 4
e instanceof DirectedEdge

can be used to defi
ne subsets and
constraints

k-partite graphs

multigraphs, simple graphs, trees, mixed-
mode graphs, hypergraphs, ...
http://jung.sourceforge.net
Using graph fi
lters

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 fi
lters together

Automate complex graph
transformations
http://jung.sourceforge.net
V
isualizing 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...
Pluggable
Renderer
http://jung.sourceforge.net
Customizing
Layout algorithms specify vertex positions
advancePositions()
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/importance
betweenness,
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 Frank
P 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 Frezza
G Picci
M Mitchell
T Jaakkola
D Haussler
P Orponen
K Murphy
H Greenspan
S Belongie
R Goodman
M Holsheimer
J Matousek
L Xu
M Paterson
M Klemettinen
H Toivonen
A Weigend
S Jung
J Boulicaut
S Casadei
S 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 Overton
J Aaronson
J Haas
Z Wang
D Hart
G Gottlob
P Stolorz
F Yao
A Robertson
E Horvitz
S Singh
B Fischer
T Leung
H Ahonen
O 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 Demaine
M Demaine
S Spence
D Geiger
M Friedl
T Eiter
E Alpaydin
S Solloway
C Hutchinson
J Waterton
D Cooper
A Barto
E Nikunen
E Dimauro
G Linden
A 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 Wolf
G Italiano
K Tumer
E Keogh
E Bernardo
E Ursella
C Triggs
D Sornette
E Friedman
L Daynes
T Printezis
T Pressburger
B Tuttle
J Haslam
G Page
C Jackson
C Bishop
D Pavlov
M Dickerson
N de Freitas
C Stauss
R Kilgour
R Manduchi
G Graefe
R Shachter
K Mosurski
R Almond
D Young
A Lapedes
R Blasi
D Chickering
R Giancarlo
K Wheeler
A Lanitis
P Prado
X Ge
S Payandeh
M Ghil
K Ide
H King
I Dryden
B Thiesson
D Pregibon
A Korhola
H 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 Gaffney
C Reina
S Chaudhuiri
P Sallis
K Laakso
B Levidow
D Donnell
M Tartagni
M Vanter
N Lawrence
C Fowlkes
J Roden
G Ridgeway
E Kuo
L Su
M Munich
D Golinelli
G Consonni
D Cunliffe
D Psaltis
G 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 Vetter
S Goodbody
M Kawato
P Hrensen
M Levitz
clustering
http://jung.sourceforge.net
Event Handling

addition/removal of vertices/edges

graphs generate events

modifi
cation 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

A
verage shortest path length, diameter

Clustering coeffi
cients

can use existing Java statistical
packages

CERN Colt Scientifi
c Library

V
isual 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
T
emporal Egocentric
Communication
Networks
Open-Source
Collaboration
LiveJournal
networks
http://jung.sourceforge.net
Integrated into
an application
http://jung.sourceforge.net
Freeman’s
Southern W
omen
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
.