[MRG] Sliced wasserstein by AdrienCorenflos · Pull Request #203 · PythonOT/POT
Thanks for the thorough review. I'll amend all this early next week. Adrien
…On Fri, 31 Jul 2020, 17:01 Rémi Flamary, ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In ot/sliced.py <#203 (comment)>: > +# +# License: MIT License + + +import numpy as np + + +def _random_projections(n_projections, dimension, random_state): + """Samples n_projections times dimension normal distributions""" + projections = random_state.normal(0., 1., [n_projections, dimension]) + norm = np.linalg.norm(projections, ord=2, axis=1, keepdims=True) + projections = projections / norm + return projections + + +def sliced(X_s, X_t, a=None, b=None, n_projections=50, seed=None): Also you should name the function sliced_wasserstein_distance — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#203 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEYGFZ675GRJHRM5DFVPEKTR6LFCTANCNFSM4PCHDJXA> .