Optimal transport problem (is it?) for moving unequal number of samples #661
-
I am trying to find the minimum cost of moving source samples in 2D to target samples so that all target samples are covered and all source samples do not need to be moved. Is this falling under optimal transport at all or is this some sort of assignment problem (Hungarian algorithm etc.)? For example adjusting your 20 sample vs 20 sample examples here: https://pythonot.github.io/auto_examples/plot_OT_L1_vs_L2.html I want to find the minimum cost (let's say euclidean) of covering the 7 target samples using the 20 source samples in however way. I expect 13 samples to be unmoved (because 7 is enough) but here is the result: Can I achieve this with POT? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Any guidance @rflamary @SoniaMaz8 @cedricvincentcuaz @eloitanguy @matthewfeickert @clbonet ? |
Beta Was this translation helpful? Give feedback.
-
Not exactly. The partial problem is symmetrical in source/target, it enforces the total amount of mass moved between source and target. Mass is more precise than "amount of samplea" it is related to the weight vectors a and b you place on your samples. The mathematical problem behind the partial OT formulation in https://pythonot.github.io/gen_modules/ot.partial.html#id34 conveys this more formally. |
Beta Was this translation helpful? Give feedback.
Hi, this is a variant of Partial OT, see https://pythonot.github.io/gen_modules/ot.partial.html#id34
Partial OT imposes the movement of a mass m, so it is not precisely what you need. To my knowledge this is the closest available function for your needs.