[ENH] Add weights
parameter to elastic_barycenter_average
#1251
Labels
distances
Distances package
enhancement
New feature, improvement request or other non-bug code enhancement
Describe the feature or idea you want to propose
Basically until now, we compute the barycenter average supposing a uniform weight distribution for all series in the batch. I would like to assume this by default, and give control over the weights in the parameters of the
elastic_barycenter_average
function.Describe your proposed solution
Basically,
weights
should be an array-like object containing a weight, between 0 and 1, with the same shape as len(X) (the number of input series). If weights is set to None (default), then the function will generate a default uniformly distributed weights between 0 and 1, on all series (i.e. weights[i] = 1/len(X)).This should then replace this part of the code inside
_ba_update
:with a weighted average
Describe alternatives you've considered, if relevant
No response
Additional context
This issue is assigned to Maxime Devanne
The text was updated successfully, but these errors were encountered: