[WIP] HD Gaussian empirical bures#814
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #814 +/- ##
========================================
Coverage 96.81% 96.82%
========================================
Files 124 124
Lines 24276 24532 +256
========================================
+ Hits 23503 23753 +250
- Misses 773 779 +6 🚀 New features to boost your workflow:
|
rflamary
left a comment
There was a problem hiding this comment.
Thank you so much @marcogenni ,
Below are a few comment about API (using only one parameter for intrisic dim, debug documentation, run tests on data from all backend). Fee free to ask questions on slack if unclear.
|
|
||
| \Sigma_s^{1/2} &=\sigma_s I_p + U_s C_s U_s^T \\ | ||
|
|
||
| C_s &=\diag(\sqrt{l_{s1} + \sigma_s^2} - \sigma_s, \dots, \sqrt{l_{sd_s} + \sigma_s^2} - \sigma_s) \\ |
| samples in the source domain | ||
| xt : array-like (nt,p) | ||
| samples in the target domain | ||
| ds : array-like (1,) |
There was a problem hiding this comment.
use integer here, array is weird API
There was a problem hiding this comment.
maybe you can pass a d interger or that can be alist/array to have different d fro source target.
There was a problem hiding this comment.
d_intrisic is also a better name because d in not very clear
| the residual variance of the source distribution | ||
| sigma_t^2 : array-like (1,) | ||
| the residual variance of the target distribution | ||
| ds : array-like (1,) |
| samples in the source domain | ||
| xt : array-like (nt,p) | ||
| samples in the target domain | ||
| ds : array-like (1,) |
|
|
||
| """ | ||
|
|
||
| xs, xt, ds, dt = list_to_array(xs, xt, ds, dt) |
There was a problem hiding this comment.
| xs, xt, ds, dt = list_to_array(xs, xt, ds, dt) |
remove list_to_array, it's there for old compatibility but no used fro new function. do that for all unctions please
| nt = 100 | ||
|
|
||
| Xs, Xt, ll = make_gauss_hd(ns, nt, p=50, dim=10, m_diff=5, a=(7, 7), b=(1, 1)) | ||
|
|
There was a problem hiding this comment.
| Xs, Xt = nx.from_numpy(Xs, Xt) | |
run the functins for aery from all existing backends (probably need to convert also all the arrays below)
|
|
||
| @pytest.mark.parametrize("bias", [True, False]) | ||
| def test_empirical_bures_wasserstein_distance_hd(nx, bias): | ||
| ns = 100000 |
There was a problem hiding this comment.
use less data test must be very fast
|
|
||
| @pytest.mark.parametrize("bias", [True, False]) | ||
| def test_empirical_bures_wasserstein_mapping_hd(nx, bias): | ||
| ns = 100000 |
There was a problem hiding this comment.
please use less data here to speedup tests

Types of changes
Add of the function ot.gaussian.empirical_bures_wasserstein_hd to compute the OT map between HD Gaussian distributions. A new function ot.datasets.make_gauss_hd was created to simulate form two HD Gaussian distributions and a test was implemented (test_bures_wasserstein_mapping_hd) in module test_gaussian.py
Motivation and context / Related issue
The changes are aimed to introduce in POT the OT map and Wasserstein distance estimators in the HD Gaussian case, as described Bouveyron and Corneli, Scaling optimal transport to high-dimensional gaussian distributions, Statistics and Computing, 2026
How has this been tested (if it applies)
PR checklist