Merge Tree Wasserstein Auto-Encoder¶
Pipeline description¶
This example first loads an ensemble of scalar fields inside a cinema database from disk. Then, the MergeTree is computed on each scalar field to compute the Split Tree.
All these trees are passed to MergeTreeAutoencoder to compute a wasserstein auto-encoding in the metric space of merge trees.
Then the filter MergeTreeAutoencoderDecoding is used to reconstruct the input merge trees.
In terms of visualization, a scalar field is displayed for each cluster, with a zoom on their right of the important persistence pairs. The original merge trees are displayed alongside their reconstruction at their right. The persistence pairs of the trees 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. Finally, a path drawn with PolyLineSource on the layout is drawn at the bottom right to show how we can interactivily explore the MT-WAE latent space with user-defined locations.
The python script computes the MT-WAE basis. This computation is not deterministic and it may take several minutes (depending on your hardware). It saves the resulting coefficients of the input merge trees and the axes of the bases and their origins. Finally it saves the reconstructed merge trees given the bases and the coordinates of the merge trees in the basis.
ParaView¶
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
paraview states/mergeTreeWAEDecoding.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 will take several minutes, depending on your hardware):
paraview states/mergeTreeWAE.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 49 50 51 52 53 54 55 56 57 58 59 |
|
To run the above Python script, go to your ttk-data directory and enter the following command:
pvpython python/mergeTreeWAE.py
Inputs¶
- Earthquake.cdb: a cinema database containing 12 regular grids.
Outputs¶
MT-WAE_processed_diagrams.vtm
: the processed input merge trees.MT-WAE_origins.vtm
: the origins of each basis.MT-WAE_axes.vtm
: the axes of each basis.MT-WAE_coef.vtm
: the coefficients of the input merge trees corresponding to their coordinates in each basis.MT-WAE_reconstructed_diagrams.vtm
: the reconstructed input merge trees.