Add as parameter the weights of the positions in the `fit` methods for the classes of module `ot.da`
Opened this issue ยท 0 comments
๐ Feature
Add as parameter the weights of the positions in the fit
methods for the classes of module ot.da
.
Motivation
In a work I am doing, I need (or needed) a way to obtain the barycentric projection of the measures I had. The classes found in the ot.da
module have the transform
method, which allows me to do the barycentric projection I was looking for. However, there was the problem that I could not specify what the weights of the positions were going to be.
Pitch
I would like to add a way to specify the position weights to the fit
methods of the classes in the ot.da
module, because in this module there are classes with several ways to compute the optimal transport that follow the same sklearn interface.
Alternatives
My solution is to add optional mu_s
and mu_t
parameters to the fit
method (and variations of this method) in the BaseTransport
class, since it is in this class that the self.mu_s
and self.mu_t
fields are defined, using the self.distribution_estimation
function. Thus, if the weights are not specified, this function would be used instead.
Once this change is made, it would be enough to change the fit
methods of the rest of the classes to incorporate this change.