Chapter 3
A map of the visualizations of frequent sequences
Visualizations of event sequences and of frequent sequences have been proposed in at least four communities: data mining, visual analytics, process mining, and social-science sequence analysis. This chapter surveys them and arranges them by the object they draw — individual sequences, transitions, prefix structures, pattern sets, or the relation between patterns and sequences — and by the question they answer. The arrangement is the plan of the following chapters, and its last table lists, for every technique, its origin and its implementation in spmviz.
3.1 Problem and idea
The visual analysis of event sequences has been surveyed several times. Guo and co-authors organize more than a hundred systems by the analysis task (summarization, prediction, anomaly detection, comparison) and by the visual representation [14]; Yeshchenko and Mendling survey event-sequence analysis and visualization across process mining and visual analytics [15]; Jentner and Keim review the visualization of patterns, sequential ones included [16]. The surveys agree on a basic distinction. Some views draw the sequences — one row per case, or an aggregation of all cases into a tree or a flow — and let the eye find the patterns. Others draw the patterns that an algorithm has found, as a list, a network, a lattice or a map. A third group connects the two by laying patterns back onto the sequences that support them. For an analyst who has mined frequent sequences, a more useful organization starts from the relation the view makes visible, because the relation determines the questions that the view can answer.
3.2 Five objects, five families
Figure 3.1 arranges the techniques by the object they draw, from the individual sequence to the pattern set.
Sequences. The sequence index plot of social-science sequence analysis draws every case as a row of colored cells [18, 19]. It hides nothing, which is its strength for a few hundred cases and its weakness for more; sorting the rows (by a pattern, by length, by a clustering) decides what can be seen. The state distribution plot or chronogram stacks the states seen at each position, the sequence frequency plot the most frequent complete sequences [18], and the relative frequency sequence plot of Fasang and Liao draws representative sequences of equal-sized groups [39]. Process mining contributed the dotted chart, which places every event at its time and case [40], bioinformatics the sequence logo, which stacks the symbols of aligned positions with heights proportional to their information content [41], and text visualization the arc diagram, which joins repeated subsequences of one long string [42].
Transitions. The simplest aggregation keeps consecutive pairs only. The directly-follows graph of process mining [17] and the first-order Markov chain are the same object; drawn as a matrix it becomes the transition matrix, drawn step by step it becomes MatrixWave, a chain of transition matrices between consecutive positions [43], and drawn on a circle it becomes a chord diagram [44]. Sankey or alluvial diagrams follow the cases from step to step [45]; Frequence used them to show frequent event sequences of patients [46], and DecisionFlow extended them to thousands of event types [47]. Sequence braiding draws the flows of sequences together with their attributes [48]. All first-order views forget where a case came from. Higher-order networks keep this memory where it matters: Rosvall and co-authors showed that second-order Markov dynamics change the communities found in flow networks [49], and Xu, Wickramarathne and Chawla introduced variable-order networks in which a node may carry its recent history [50].
Prefix structures. Merging the common prefixes of the sequences gives a tree, the oldest aggregation of event sequences. The sunburst draws it as rings [51], the icicle as stacked bars [52]; Session Viewer applied such views to web sessions [53], LifeFlow placed every node at the mean time since the start [54], EventFlow simplified the tree by merging rare branches [55], and CoreFlow extracted the branching patterns from it [56]. The word tree of Wattenberg and Viégas grows the tree from a chosen word [57]; the double tree grows it in both directions [58], and Krause and co-authors enriched double trees of event sequences with category-based comparison [59]. ActiviTree explores activity sequences by graph similarity [60].
Pattern sets. Systems that mine first and draw afterwards usually show the patterns as a list of glyphs, linked to other views: Frequence [46], the clinical event-pattern methodology of Gotz, Wang and Perer [61], the clickstream explorer of Liu and co-authors [62], and the pattern-growth explorer of Vrotsou and Nordman, which lets the analyst steer the mining itself [63]. Stolper, Perer and Gotz plotted the patterns as points in the plane of two measures while the mining was still running [64]. Association-rule visualization contributed the grouped matrix of Hahsler and Karpienko [65, 66], and set visualization the UpSet plot [67]. Summaries by the minimum description length principle select a few patterns that compress the data [68, 69, 70], and Sequence Synopsis draws such a summary as a set of representative paths [71]. The network-based views of Bántay and Abonyi draw the pattern set itself as a weighted network of extensions and as two maps [1].
Patterns and sequences. The relation between a pattern set and the cases is a binary matrix, the pattern–sequence incidence matrix. Seriated, it shows blocks of patterns supported by the same cases [72]; summarized as a similarity it becomes the transaction map of NBVFS; and laid onto an index plot or a dotted chart it shows where a pattern occurs. For dense relations, matrix views are more readable than node-link diagrams [73].
3.3 Which view answers which question
The questions of an analysis are more stable than the views. Table 3.1 arranges the views of the book by the questions they answer best; most questions have more than one good answer, and the examples of the following chapters show the same data in several views.
Question | Views (chapter) |
How do the cases begin, and how do they branch? | |
Where is the next step unpredictable? | |
What happens before and after an event? | word tree, double tree, sequence logo, anchored Sankey (5, 8, 6) |
How long do the steps take? | |
Which event follows which? | directly-follows graph, transition matrix, MatrixWave, chord (6) |
Does the next step depend on the history? | higher-order network (6) |
Which frequent sequences grow out of which? | extension network NBVFS-WN, growth Sankey, lattice (4, 6, 7) |
Which patterns belong to the same scenario or sub-process? | NBVFS-CM and -TM maps, fused map, communities, incidence and similarity matrices, landscape (4, 7) |
Which patterns are interesting rather than merely frequent? | measure scatter, grouped rule matrix (7) |
How do two groups of cases differ? | |
Where in the cases does a pattern occur? | index plot and dotted chart with highlighted patterns, MDL cover (8) |
What is the shortest faithful summary? |
3.4 The catalogue
Table 3.2 lists the techniques implemented in spmviz with their origin. Views marked new were developed for this book; their construction is explained in the chapter given in the last column.
|
Technique |
Origin |
spmviz function | Ch. |
|
glyph table of patterns |
plot_patterns | 2 | |
|
pattern explosion curve |
[31] |
plot_explosion | 2 |
|
weighted extension network (WN) |
[1] |
NBVFS("wn"), plot_nbvfs_wn | 4 |
|
confidence-based MDS map (CM) |
[1] |
NBVFS("cm"), plot_nbvfs_cm | 4 |
|
transaction-based MDS map (TM) |
[1] |
NBVFS("tm"), plot_nbvfs_tm | 4 |
|
fused similarity map |
new, after [74] |
NBVFS("fused") | 4 |
|
pattern communities and sub-logs |
new, after [75] |
pattern_communities, sublogs, plot_communities | 4 |
|
prefix (pattern) tree |
plot_prefix_tree | 5 | |
|
sunburst |
[51] |
plot_sunburst | 5 |
|
icicle, LifeFlow |
plot_icicle | 5 | |
|
word tree, double tree |
plot_double_tree | 5 | |
|
continuation-entropy tree |
new |
plot_prefix_tree(color_by="entropy") | 5 |
|
contrast sunburst and table |
new, after [76] |
plot_sunburst(color_by="contrast"), measures.contrast | 5 |
|
Sankey (alluvial) diagram |
plot_sankey | 6 | |
|
directly-follows graph |
[17] |
plot_transition_graph | 6 |
|
transition matrix, MatrixWave |
[43] |
plot_transition_matrix, plot_matrixwave | 6 |
|
chord diagram |
[44] |
plot_chord | 6 |
|
growth Sankey of the extension tree |
new |
plot_growth_sankey | 6 |
|
pattern-induced higher-order network |
new, after [50] |
higher_order_network, plot_hon | 6 |
|
pattern–sequence incidence matrix |
[72] |
plot_incidence | 7 |
|
seriated similarity matrix |
plot_similarity_matrix, seriate | 7 | |
|
grouped matrix of sequential rules |
[65] |
plot_rules_matrix | 7 |
|
measure scatter plot |
[64] |
plot_pattern_scatter | 7 |
|
pattern landscape |
new |
plot_landscape | 7 |
|
lattice (Hasse diagram) |
[31] |
plot_lattice | 7 |
|
UpSet plot |
[67] |
plot_upset | 7 |
|
sequence index plot |
plot_sequence_index | 8 | |
|
state distribution plot (chronogram) |
[18] |
plot_state_distribution | 8 |
|
sequence frequency plot |
[18] |
plot_sequence_frequency | 8 |
|
dotted chart |
[40] |
plot_dotted_chart | 8 |
|
gap and span distributions |
new |
plot_gap_distribution | 8 |
|
sequence logo |
[41] |
plot_sequence_logo | 8 |
|
arc diagram |
[42] |
plot_arc_diagram | 8 |
|
episode timeline |
[38] |
plot_episode_timeline | 8 |
|
MDL cover plot |
plot_cover | 8 | |
|
next-event prediction view |
plot_prediction | 10 | |
|
overview dashboard |
new |
plot_overview | 10 |
3.5 Further reading
Guo and co-authors [14] give the most systematic review of the visual analysis of event sequences, with a taxonomy of tasks; Yeshchenko and Mendling [15] connect it to process mining. Behrisch and co-authors [72] review the seriation of matrices, which underlies several views of chapter 7, and Borg and Groenen [20] the multidimensional scaling behind the maps of chapter 4.