Persistence Diagram Wasserstein Auto-Encoder¶
Pipeline description¶
This example first loads an ensemble of scalar fields inside a cinema database from disk. Then, the PersistenceDiagram is computed on each scalar field.
All these diagrams are passed to MergeTreeAutoencoder to compute a wasserstein auto-encoding in the metric space of persistence diagrams.
Then the filter MergeTreeAutoencoderDecoding is used to reconstruct the input diagrams.
In terms of visualization, a scalar field is displayed for each cluster. The original diagrams are displayed alongside their reconstruction at their right. The persistence pairs of the diagrams are colored by ID to see what features they correspond to in the scalar field.
The 2D planar layout is displayed with the persistence correlation view at the top right. The 12 scalar fields are colored by Cluster ID.
The python script computes the PD-WAE basis. This computation is not deterministic and it may take a minute (depending on your hardware). It saves the resulting coefficients of the input diagrams and the axes of the bases and their origins. Finally it saves the reconstructed diagrams given the bases and the coordinates of the diagrams in the basis.
ParaView¶
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
paraview states/persistenceDiagramWAEDecoding.pvsm
To reproduce the above analysis pipeline as well as the (non-deterministic) training procedure, go to your ttk-data directory and enter the following command (the computation may take a minute, depending on your hardware):
paraview states/persistenceDiagramWAE.pvsm
Python code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
To run the above Python script, go to your ttk-data directory and enter the following command:
pvpython python/persistenceDiagramWAE.py
Inputs¶
- Isabel.cdb: a cinema database containing 12 regular grids.
Outputs¶
PD-WAE_processed_diagrams.vtm
: the processed input diagrams.PD-WAE_origins.vtm
: the origins of each basis.PD-WAE_axes.vtm
: the axes of each basis.PD-WAE_coef.vtm
: the coefficients of the input diagrams corresponding to their coordinates in each basis.PD-WAE_reconstructed_diagrams.vtm
: the reconstructed input diagrams.