Time Series Alignment with Global Invariances