Appendix B
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.
B.1 First steps: series, segmentations, representations, PCA models
Folder examples/01_basics/. The methods are described in chapter 1.
|
Script |
Topic |
Figure |
|
||
|
plot_01_first_steps.py |
First steps: segment, look, evaluate | |
|
plot_02_representations.py |
Representations: PAA, PLA, SAX, episodes | |
|
plot_03_pca_models.py |
PCA models: T, Q and similarity factors | |
|
||
|
||
|
||
|
||
|
||
B.2 Cost-based segmentation: costs, searches, number of segments
Folder examples/02_cost_segmentation/. The methods are described in chapter 4.
|
Script |
Topic |
Figure |
|
||
|
plot_01_costs_and_search.py |
Costs and search strategies | |
|
plot_02_segmentogram.py |
The merge hierarchy: segmentogram and persistence | |
|
plot_03_number_of_segments.py |
How many segments? |
— |
|
||
|
||
|
||
|
||
|
||
B.3 Latent-variable segmentation: PCA, dynamic PCA, recursive PCA, fuzzy and Fisher segmentation
Folder examples/03_latent_segmentation/. The methods are described in chapter 5.
|
Script |
Topic |
Figure |
|
||
|
plot_01_pca_t2_q.py |
PCA segmentation with the T and Q statistics | |
|
plot_02_dynamic_pca.py |
Dynamic PCA segmentation | |
|
plot_03_recursive_pca.py |
On-line segmentation with recursive PCA | |
|
plot_04_fuzzy_segmentation.py |
Fuzzy segmentation with the modified Gath–Geva algorithm | |
|
plot_05_fisher_mma.py |
Informative segments for parameter estimation (MMA polymerization) | |
|
plot_06_energy_regression.py |
Operating ranges of an energy indicator | |
|
||
|
||
|
||
|
||
|
||
B.4 Probabilistic, profile-based and state segmentation
Folder examples/04_modern_segmentation/. The methods are described in chapter 6.
|
Script |
Topic |
Figure |
|
||
|
plot_01_bocpd.py |
Bayesian on-line change point detection | |
|
plot_02_states.py |
Recurring operating states | |
|
plot_03_clasp_fluss.py |
Shape changes: ClaSP and FLUSS | |
|
plot_04_predictive.py |
Predictive homogeneity with any scikit-learn model | |
|
plot_05_consensus.py |
Consensus of segmentations | |
|
plot_06_streaming.py |
Segmentation of a data stream |
— |
|
||
|
||
|
||
|
||
|
||
B.5 Elastic similarity: DTW and its relatives
Folder examples/05_warping/. The methods are described in chapter 7.
|
Script |
Topic |
Figure |
|
||
|
plot_01_dtw_basics.py |
Dynamic time warping and global constraints | |
|
plot_02_dtw_variants.py |
A family of elastic measures on Cylinder–Bell–Funnel | |
|
plot_03_soft_dtw.py |
Soft-DTW: a differentiable alignment and its uncertainty | |
|
plot_04_diagnostics_learning.py |
Diagnosing and tuning warping |
— |
|
||
|
||
|
||
|
||
|
||
B.6 Correlation-based and segment-level warping
Folder examples/06_correlation_warping/. The methods are described in chapter 8.
|
Script |
Topic |
Figure |
|
||
|
plot_01_cbdtw_signatures.py |
Correlation-based dynamic time warping | |
|
plot_02_correlation_sequences.py |
When the information is in the correlation structure | |
|
plot_03_dynamic_cbdtw.py |
Process-dynamics-aware warping: DPCA-CBDTW | |
|
plot_04_japanese_vowels.py |
Real data: Japanese vowels and Riemannian local distances | |
|
plot_05_pla_mdpla.py |
Piecewise linear warping: MPLA, SPLA and MDPLA | |
|
plot_06_mixed_segments.py |
A multivariate mixed segment distance |
— |
|
plot_07_episodes.py |
Comparing qualitative trends: episode alignment | |
|
||
|
||
|
||
|
||
|
||
B.7 Clustering series, segments and trajectories
Folder examples/07_clustering/. The methods are described in chapter 9.
|
Script |
Topic |
Figure |
|
||
|
plot_01_partitional.py |
Partitional clustering: k-means, k-Shape, k-medoids | |
|
plot_02_hierarchical_maps.py |
Hierarchical clustering and distance maps | |
|
plot_03_basic_motions.py |
Clustering multivariate recordings: BasicMotions | |
|
plot_04_segment_clustering.py |
Clustering segments: recurring patterns across series | |
|
plot_05_trajectories.py |
Objects that move together: trajectory clustering |
— |
|
||
|
||
|
||
|
||
|
||
B.8 Evaluation, validation and benchmarking
Folder examples/08_evaluation/. The methods are described in chapter 10.
|
Script |
Topic |
Figure |
|
||
|
plot_01_metrics.py |
Measuring segmentation quality | |
|
plot_02_stability.py |
Is the segmentation stable? | |
|
plot_03_benchmark.py |
Benchmarking segmenters with statistical tests | |
|
plot_04_tuning.py |
Tuning segmenter parameters |
— |
|
||
|
||
|
||
|
||
|
||
B.9 Visualization and explanation
Folder examples/09_visualization/. The methods are described in chapter 11.
|
Script |
Topic |
Figure |
|
||
|
plot_01_dashboard.py |
A one-page segmentation report | |
|
plot_02_visibility_graphs.py |
Six-sigma visibility graphs | |
|
plot_03_recurrence_images.py |
Series as images and networks | |
|
plot_04_warping_maps.py |
Looking inside alignments and collections | |
|
||
|
||
|
||
|
||
|
||
B.10 Model operations
Folder examples/10_mlops/. The methods are described in chapter 12.
|
Script |
Topic |
Figure |
|
||
|
plot_01_pipeline_registry.py |
From analysis to a deployable model |
— |
|
plot_02_drift_monitoring.py |
Monitoring a deployed model for drift | |
|
plot_03_tracking_cards.py |
Experiment tracking and model cards |
— |
|
||
|
||
|
||
|
||
|
||
B.11 Case studies
Folder examples/11_applications/. The methods are described in chapter 13.
|
Script |
Topic |
Figure |
|
||
|
plot_01_polymer_grades.py |
Grade transitions of a polymerization reactor | |
|
plot_02_ph_process.py |
Operating regions of a pH neutralization process | |
|
plot_03_regime_explanation.py |
Explaining operating regimes | |
|
||
|
||
|
||
|
||
|
||