Appendix C
The example gallery
Every method of the toolbox has at least one runnable example script. The scripts generate or load their own data, explain the method in their comments, and end with a study of the main parameters. The same scripts produce the gallery of the online documentation, the Jupyter notebooks, and every computed figure and code listing of this book. The tables below list them by folder of examples/, with the first figure of the book that each script produced.
C.1 First steps: data, mining, constraints, files
Folder examples/01_basics/. The methods are described in chapter 2.
|
Script |
Topic |
Figure |
|
plot_01_first_steps.py |
First steps: four sequences of the PrefixSpan paper | |
|
plot_02_daily_routines.py |
An everyday example: daily routines | |
|
plot_03_algorithms.py |
Five algorithms, one answer | |
|
plot_04_constraints.py |
Gaps, spans and time windows | |
|
plot_05_import_export.py |
Import and export: pandas, SPMF, networkx, Gephi, Cytoscape |
— |
C.2 Network-based visualization of frequent sequences
Folder examples/02_nbvfs/. The methods are described in chapter 4.
|
Script |
Topic |
Figure |
|
plot_01_weighted_network.py |
NBVFS-WN: the weighted extension network | |
|
plot_02_confidence_mds.py |
NBVFS-CM: confidence-based MDS map | |
|
plot_03_transaction_mds.py |
NBVFS-TM: transaction-based MDS map | |
|
plot_04_alarm_log.py |
The industrial alarm log of the paper | |
|
plot_05_fused_similarity.py |
Beyond the paper: fused similarities and pattern communities | |
C.3 Trees: prefix trees, sunbursts, icicles, word trees
Folder examples/03_trees/. The methods are described in chapter 5.
|
Script |
Topic |
Figure |
|
plot_01_chess_sunburst.py |
A spectacular sunburst: chess openings | |
|
plot_02_entropy_tree.py |
Where does the process branch? The continuation-entropy tree | |
|
plot_03_word_tree.py |
Word trees around a pivot | |
|
plot_04_contrast_tree.py |
Comparing two groups: contrast sunburst | |
|
plot_05_lifeflow_icicle.py |
Time-aware icicles (LifeFlow) | |
C.4 Flows: Sankey diagrams, transition graphs, higher-order networks
Folder examples/04_flows/. The methods are described in chapter 6.
|
Script |
Topic |
Figure |
|
plot_01_sankey.py |
Sankey diagram of web-shop journeys | |
|
plot_02_transition_graph.py |
Transition graphs, matrices and MatrixWave | |
|
plot_03_chord.py |
Chord diagram of everyday transitions | |
|
plot_04_growth_sankey.py |
How support splits when sequences grow | |
|
plot_05_higher_order_network.py |
Pattern-induced higher-order networks: when history matters | |
C.5 Maps and matrices of pattern sets
Folder examples/05_maps/. The methods are described in chapter 7.
|
Script |
Topic |
Figure |
|
plot_01_incidence_similarity.py |
Matrices of a pattern set | |
|
plot_02_rules_matrix.py |
Sequential rules as a grouped matrix | |
|
plot_03_measure_scatter.py |
Patterns in the plane of two measures | |
|
plot_04_landscape.py |
Pattern landscapes | |
|
plot_05_lattice_upset.py |
Lattices and UpSet plots | |
C.6 Sequences: index plots, logos, arcs, episodes, summaries
Folder examples/06_sequences/. The methods are described in chapter 8.
|
Script |
Topic |
Figure |
|
plot_01_index_plot.py |
Sequence index plots with pattern occurrences | |
|
plot_02_chronogram_frequency.py |
Chronograms and sequence frequency plots | |
|
plot_03_dotted_chart.py |
Dotted chart of alarm floods | |
|
plot_04_sequence_logo.py |
Sequence logos | |
|
plot_05_arc_diagram.py |
Arc diagram of a melody | |
|
plot_06_episodes.py |
Episodes in one long alarm stream | |
|
plot_07_mdl_summary.py |
A summary in a few patterns: MDL | |
C.7 Applications and benchmarks
Folder examples/07_applications/. The methods are described in chapter 10.
|
Script |
Topic |
Figure |
|
plot_01_benchmarks.py |
Benchmark databases of sequential pattern mining | |
|
plot_02_clickstream_story.py |
Case study: the UWV unemployment-benefit application | |
|
plot_03_alarm_early_warning.py |
Case study: early warning in alarm management | |
|
plot_04_interactive.py |
Interactive figures |
— |