Assume we have two vectors, containing random samples (maybe audio data?). Their distribution can be approximated to a normal distribution, so we can calculate their mean and standard deviation.

  • I am looking for a way to "fit" the second vector's samples, in a way that their mean and standard deviation correspond to the first vector's mean and standard deviation.

  • Also, I am looking for a way to do this by "moving the second vector's samples the least possible". This is because, an easy way to solve this problem could be to replace the second vector's data, with random samples that fit the first vector's parameters. This solution is easy, but not interesting.


  • Is this kind of problem correlated with machine learning in general? If yes "how"?

  • Is there a way to perform this kind of operation with some kind of neural network? If yes, how could it be modelled?

  • $\begingroup$ The earth mover's distance could be a relevant keyword here, I think that is what you're trying to do. $\endgroup$
    – N. Kiefer
    Jun 1, 2021 at 7:15
  • $\begingroup$ Thanks, seems to be the right path. Is this earth mover's distance correlated or used in machine Learning? $\endgroup$
    – Barsaas
    Jun 1, 2021 at 16:34

1 Answer 1


This is precisely the optimal transportation problem. If both vectors are defined on the same space, you are trying to minimize the Wasserstein distance (which I think is equivalent to what N. Kiefer suggested). Associated to the Wasserstein distance / optimal transport cost is an optimal transport plan, which tells you how to transport the mass from vector 2 onto vector 1.

Optimal transport has become fairly popular in ML, check the WGAN for example.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .