qlroms.transitions
TransitionMaps
dataclass
Transition operators with selectable mapping strategy.
Methods:
| Name | Description |
|---|---|
- "atlas" |
use Tgk/dgk/Tkg/dkg (local->global->local), exact when the atlas contains each local affine space. |
- "pairwise" |
use tmap/tshift direct chart-to-chart maps. |
- "auto" |
atlas when available, else pairwise. |
- "physical" |
DISTANCES only -- lift the state to physical space (centroid + Phi a) and compare to every cluster centroid directly, the ground truth the other metrics approximate (O(N) per step; needs centroids/Phi_all, see from_model). Mass-weighted when wt is set: sqrt(sum(wt * (c - x)^2)), the metric a weighted (Mw-diagonal) atlas reproduces exactly; plain Euclidean when wt is None. The map itself falls back to atlas/pairwise (exact by construction, so the metric choice is the only thing "physical" changes). |
Source code in qlroms/transitions.py
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
to_atlas(a, k_from)
Lift coordinate(s) a from chart k_from into the shared atlas frame: z = Tgk[k_from] a + dgk[k_from]. a: (r,) or (r, m), torch or numpy.
Source code in qlroms/transitions.py
96 97 98 99 100 101 102 | |
from_atlas(z, k_to)
Drop atlas coordinate(s) z into chart k_to: a = Tkg[k_to] z + dkg[k_to] (the exact inverse of to_atlas on chart k_to's affine subspace).
Source code in qlroms/transitions.py
104 105 106 107 108 109 110 | |
map(a, k_from, k_to)
Map coordinate(s) a from chart k_from to chart k_to.
a: (r,) or (r, m), torch.Tensor or np.ndarray (the ops are type-generic).
Source code in qlroms/transitions.py
112 113 114 115 116 117 118 119 120 | |
distances(a, k_from)
Distance from state (a in chart k_from) to all cluster centroids.
Returns:
| Type | Description |
|---|---|
|
(K,) vector with distances in chosen transition metric. |
Source code in qlroms/transitions.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |