Maximum diversity, weighting and invariants of time series