This works only if the series are z-normalized, since the output will also have this
normalization.The resulting centroid will have the same length as centroid
if provided. Otherwise, there
are two possibilities: if all series from X
have the same length, all of them will be used
as-is, and the output will have the same length as the series; if series have different lengths,
a series will be chosen at random and used as reference. The output series will then have the
same length as the chosen series.
This centroid computation is casted as an optimization problem called maximization of Rayleigh
Quotient. It depends on the SBD
algorithm. See the cited article for more details.