Consensus Patterns of a Set of Time Series via a Wavelet-Based Temporal Localization: Emphasizing the Utility over Point-Wise Averaging and Averaging under Dynamic Time Warping

Summarizing or averaging a sequential data set (i.e., a set of time series) can be comprehensively approached as a result of sophisticated computational tools. Averaging under Dynamic Time Warping (DTW) is one such tool that captures consensus patterns. DTW acts as a similarity measure between time series, and subsequently, an averaging method must be executed upon the behaviour of DTW. However, averaging under DTW somewhat neglects temporal aspect since it is on the search of similar appearances rather than stagnating on corresponding time-points. On the contrary, the mean series carrying point-wise averages provides only a weak consensus pattern as it may over-smooth important temporal variations. As a compromise, a pool of consensus series termed Ultimate Tamed Series (UTS) is studied here that adheres to temporal decomposition supported by the discrete Haar wavelet. We claim that UTS summarizes localized patterns, which would not be reachable via the series under DTW or the mean series. Neighbourhood of localization can be altered as a user can customize different levels of decomposition. In validation, comparisons are carried out with the series under DTW and the mean series via Euclidean distance and the distance resulted by DTW itself. Two sequential data sets are selected for this purpose from a standard repository.


Introduction
Classical topic of summarizing and classifying a sequential data set (i.e., a set of time series) has recently gained a new outlook because of data mining and machine learning procedures [1][2][3]. Investigating common pattern (or shape) attributes (e.g., monotonic, oscillatory, and periodic) of a set of time series is ever so attainable, but still challenging even with advanced computer technology. The basic reason is that data are ordered unlike in a usual data set. In practice, time series arise in many scenarios such as economic and financial indices, weather forecasting, disease transmission, census data, market surveys, quality control, and inventory studies [4]. Data availability is also unprecedented as digital platforms facilitate gathering, storing, and processing data in profound ways [5]. Therefore, we always need effective and efficient techniques to extract valuable information from sequential data [6][7][8].
Finding a consensus or representative time series for a set of time series (i.e., a pattern similar to many series) is often found in a handful of phenomena. Daily rainfall of a region reported by several substations, fluctuation of a financial index in different stock markets and banks, daily sales of goods in different outlets of a supermarket chain, speech and gesture recognition, and genetic sequencing of an organism are among such phenomena [9][10][11]. The domain of a time series does not necessarily stand for time; for instance, it refers to the order of nucleotides in deoxyribonucleic acid (DNA). Pattern recognition not only in series-wise but also as a whole set of series is a key concern. In this work, we are interested in the latter. A measure called Dynamic Time Warping (DTW) is frequently used to extract similarity between time series. Then, one can design an averaging method based on the behaviour of DTW that gives a consensus pattern (i.e., a pattern aligned with many series in the set) [9,12]. DTW has been developed as a nonlinear mapping between time series to map similar features, neglecting temporal distortions [13]. Thus, a resulting series under DTW captures attributes of pattern rather than attributes of point-wise central tendency. We name the "series under DTW" as "Dynamic Time Warping Series (DTWS)." This is similar to the naming of "mean series" giving the "series under point-wise averaging." The main drawback of DTWS is its limitations on representing local patterns (i.e., corresponding patterns upon temporal proximity). DTW approaches two time series at a time structuring a distance matrix and backtracks in the direction of minimum cumulative distances to achieve so called warping path [14,15]. Formulation of this output (DTWS) for a set of time series via DTW is explained in detail in Section 2. Improved versions of DTW are available in the literature such as NLAAF (Nonlinear Alignment and Averaging Filters), PSA (Prioritized Shape averaging), and RSA (Re-sampling Shape Averaging) which address the limitations of the algorithm in different aspects. Further, there are techniques such as Contrast Enhanced Dynamic Time Warping (CEDTW) and DTW Barycenter Averaging (DBA) which have greater accuracy and higher performance [15]. However, for this study, we stick to the basic DTW algorithm leaving improved versions into future work. This study is the first of this kind that compares UTS with consensus series under DTW.
In contrast to DTWS, the series produced by point-wise averages (the mean series) represents central tendency, but hardly absorbs pattern attributes. The mean x for any set of data points x i ; i = 1, 2, ⋯n yields the minimum squared deviation ∑ n i=1 ðx i − xÞ 2 with the data set. Therefore, for any set of time series, the mean series assures the minimum point-wise squared deviation. Consequently, the mean series may be an over-smoothed representative, restricting to impart patterns of data series.
To address the limitations of the mean series, an alternative technique called Ultimate Tamed Series (UTS) has been proposed [16][17][18]. On top of DTWS, it acquires local patterns with customized temporal windows. UTS is based on discrete Haar wavelet transform. In literature, Haar wavelet is recorded as the earliest wavelet approach and also the simplest in structure [19][20][21]. In formulating UTS, a variant of Haar matrix is implemented transforming a time series into two series, termed as scaling coefficients (father wavelets) and wavelet coefficients (mother wavelets). These two wavelet types are worked out in a specific way called taming [22]. Preliminary details of wavelets and taming are recalled in Section 3. This paper extends UTS technique into higher levels of transform aligning with multiterminal binary decision diagrams available to Haar wavelet [19]. It is designed upon father wavelets that behaves as level-wise representatives of the original time series.
Similar to DTWS, UTS is also operated with two time series at a time. After operating for two time series (chosen from a given set of data series), the resultant series and the next data series are operated together and the same process is recursively carried out. Since DTWS and UTS do not accommodate commutative and associative properties, a lot of consensus series can be determined. Note that DTW is a pseudo-metric which preserves the commutative property giving the same warping distance irrespective of the order of concern for two time series. However, DTWS for two time series may vary with its order of concern due to the backtracking process in generating the consensus series. In the backtracking process, different warping paths can be generated when there is a tie between minimum neighbouring elements in the distance matrix. This scenario is explained in [23], and the DTWS formulation is described in Section 2. Thus, DTW and UTS depend on hierarchies of taking time series into the respective computational procedures [22,23]. In this comparative study, two specific hierarchies are considered catering the highest and the lowest variations among consecutive data points in each series.
Three consensus approaches, the mean series, DTWS, and UTS, establish pattern attributes in different extents. Identifying the capability of representing patterns is worth investigating which is the main task of this paper. We test these measures for OSULeaf data set and Yoga data set available in UEA & UCR Time Series Classification Repository [24]. Section 5 contains details of data processing used to implement consensus approaches mentioned above. In the sequel, we present basic routines of DTW (Section 2) and UTS (Section 3) along with comparison tools (Section 4). Furthermore, Section 3.3 presents theoretical support for the claims tested in Section 6.

Dynamic Time Warping Series (DTWS)
DTW algorithm is based on a distance measure called Levenshtein distance [13,25]. For two time series of equal length N denoted in sequential terminology S ð1Þ = fs ð1Þ n g N n=1 and S ð2Þ = fs ð2Þ n g N n=1 , the Levenshtein string metric D is recursively obtained by where dðs p , S ð2Þ q Þ. Next, a string called the optimal warping path W = fw r g R r=1 , wherew r = ½a, b for some a, b ∈ ℕ, is constructed by backtracking the entries of the matrix D N×N in the direction of minimum cumulative distance starting from the entry ðN, NÞ to the entry (1,1) [26]. Note that, for each a and b, there is a corresponding b Þ/2) corresponding to each selected entry in the path W. This is the process we refer by "averaging under DTW." This consensus measure need not to have similar length to the original series, and also, the original series need not to be similar in length. D brings a quantification of similarity between two series. Thus, we further use overall similarity given by DðS ð1Þ N , S ð2Þ N Þ to design a comparison tool later in Section 4. Here, lesser D shows more similarity.
For more than two time series, DTWS is computed recursively considering the DTWS of the first two series with the third series and that resultant DTWS with the fourth series and so on [15]. In this process, pairs ðs Þ/ðj + 1Þ [15]. As mentioned, hierarchy of arranging series into the warping process comes into play here giving different DTWS for different hierarchies. Since the final output in the warping process is substantially longer than the original lengths of the series, the uniform scaling is applied to achieve a consensus series of a length similar to that of data series [14,27]. A series W = fw r g R r=1 can be scaled to a sequence Z = fz n g N n=1 of required length N, with z n = w dn:R/Ne . Then, the new series Z yields a scaled DTWS. This constraint on length forms a common platform for upcoming comparisons. We execute scaling after all the series are taken into warping process allowing temporal distortions to remain flexible.

Ultimate Tamed Series (UTS)
In this section, we present the structure of UTS, and next two sections direct its implementation as a comparable tool to the mean series and DTWS. We start with two time series where the procedure is to be recursively used upon any number of time series. First, obtaining father and mother wavelets is described in Section 3.1 as designed via Haar wavelet. Next, the taming procedure is structured in Section 3.2 emphasizing extended work on higher levels. In the final implementation, we should decide a hierarchy of taking time series into the taming procedure. Section 3.5 sets that hierarchy, and Section 5 contains some illustrations of it in association with data. In this study, we execute computer programs designed using the MATLAB software for all the implementations of UTS and DTWS, whereas any other mathematical software can also be used.
3.1. The Discrete Haar Wavelet as a Weak Form: Father and Mother Wavelets. In mathematical analysis, weak forms are applicable when it is difficult to deal with strong forms. If we treat pattern recognition of time series as a strong form, recognizing patterns via wavelet transform resembles a weak form. Then, different transforms lead to different outlooks of statistics of time series. In general, implementation of weak forms may have their own limitations as we see in Finite Element Methods that require careful choice of weight functions and trial solutions [28,29]. UTS can also be considered as one that arises from a weak form.
The initial step of UTS is to partition time series into twotuples (two-component vectors). For instance, for a time series fs n g, the discrete Haar transform works on two-tuples: ðs 1 , s 2 Þ, ðs 3 , s 4 Þ, ðs 5 , s 6 Þ, ⋯, when we start by s 1 . This coupling leads to partial associations since two-tuples generated by shifting the start by one data point (i.e., ðs 2 , s 3 Þ, ðs 4 , s 5 Þ, ðs 6 , s 7 Þ, ⋯) are not directly approached. In a comprehensive analysis, both these couplings can be trialed to curtail missing associations in one coupling. However, the first data point s 1 is not considered in the shifted case, and inclusion of the last data point is based on whether the series has even or odd number of points. This would not be a major drawback when we deal with lengthy time series in practice. Then, the extreme data points do not hinder much the overall context of the series.
Hereafter, we name ðs 1 , s 2 Þ, ðs 3 , s 4 Þ, ðs 5 , s 6 Þ, ⋯ as 1 st coupling and ðs 2 , s 3 Þ, ðs 4 , s 5 Þ, ðs 6 , s 7 Þ, ⋯ as 2 nd coupling. Furthermore, we proceed with time series containing odd number of data points: fs n g 2N+1 n=1 (N ∈ ℕ), where we ignore the first data point in 2 nd coupling and the last data-point in 1 st coupling to read as 1 st coupling : S 2n−1 , S 2n ð Þ f g N n=1 and 2 nd coupling Next, father and mother wavelets are determined by right-multiplying the two-tuples by variant Haar matrix can be obtained back by the following inverse operations.
Note that the inverse of H v is given by where right-multiplying the two-tuples ð f n , m n Þ provides back the time series fs n g 2N+1 n=1 .
Remark 3. The H v -transform in Definition 1 is continued into further levels upon father wavelet series. We address this in Section 3.2.1 with required work of UTS.
3.2. Taming Procedure. So called taming is the key procedure that articulates UTS. It is nurtured in the transformed series obtained via H v -transform. Here, we first present the way of taming two series and next extend it into more series and more transform levels. Only 1 st coupling is demonstrated here, where the same approach is applicable to 2 nd coupling.
Step 1 (father and mother wavelets). Two time series Step 2 (taming criteria). We define the differences Df n and Dm n for the father and mother wavelets of two time series as Df n = j f ð1Þ n − f ð2Þ n j and Dm n = jm ð1Þ n − m ð2Þ n j.
The taming procedure is performed via averaging either father wavelet or mother wavelet subject to the highest of Df n and Dm n as follows (taming criteria). Superscript ðnewÞ stands for new wavelets produced by the taming criteria. Remark 4. Geometric motivation for the above procedure has been addressed in [16-18, 22, 30]. To recall along with Figure 1, let L 1 be the line segment joining the data points In summary, we tend to tame by father wavelets if the difference of them are higher (i.e., line segments are apart) and otherwise, we tame by mother wavelets. Case (ii) compromises qualitatively moderate situation.
Step 3 (tamed series). A tamed series T ð1Þ = ft  . We denote T ð1Þ = S ð1Þ ⊕ S ð2Þ showing T ð1Þ as the end result of taming S ð1Þ and S ð2Þ . Thus, T ð1Þ is considered as a consensus series.
Remark 5. Note that T ð1Þ is the same as the mean series of S ð1Þ and S ð2Þ , if both father and mother wavelets are averaged in Step 2 instead of one. This coins the word taming as it sounds a lesser smoothing effect compared to usual averaging. Geometric illustration of the taming criteria is available in [17,30].
Remark 6. Operation ⊕ is noncommutative and nonassociative since we bias on first series in deciding new wavelet that is not averaged in (i) and (ii) of Step 2.
We see these as optimistic properties that allow a hierarchical procedure into a consensus measure, which is not available for the mean series. A user can customize the hierarchy according to a required descriptive analysis.
Step 4 (UTS). To find a consensus series for more than two time series, the taming procedure must be extended by taming new series with already tamed series. Figure 2 indicates the flow of this recursive procedure for a set of k time series fS ð1Þ , S ð2Þ , ⋯S ðkÞ g. Here, T ðk−1Þ is considered as an end result giving a consensus series for all k series and named it as Ultimate Tamed Series (UTS), i.e., The entries of the above UTS acquire local trend only with an adjacent point partitioned in 1 st coupling. Indeed, sign of mother wavelet illustrates increasing/decreasing trends as it caters a difference. In order to capture pattern attributes by more data points, taming procedure should be applied to further transform levels as described in Section  Figure 3 depicts how a time series fs n g with eight data points is transformed into four levels as a binary diagram.
Father wavelets in level h rescale original time series by averaging 2 h adjacent points (data points with temporal proximity), while mother wavelets associate with the difference of such rescaled father wavelets in the previous level. The averaging occurs due to the scaling by 1/2 in H v -transform, giving a representative role (i.e., average) to father wavelets. We later illustrate our results with these 2 h -tuple windows. Now, we can move into higher level taming after transforming two time series S ð1Þ = fs up to required levels. Taming for higher levels h = 2, 3, ⋯ is carried out via Step 2 in Section 3.2 for father and mother wavelets of respective level. Suppose we select a particular h as the taming level that we implement Step 2. Next, the inverse procedure similar to Step 3 is carried out in level h to obtain new father wavelets of level h − 1. Note that here, we have only the father wavelets by inverse transform in Step 3. Moreover, to make a complete taming, we must continue the inverse up to the level of original series. Then, we need corresponding mother wavelets, and for that, we propose two ways as follows.
(i) Inverse with Average Mother (AM-Inverse). For all the levels from level h − 1 to level 1, we use respective averages of mother wavelets corresponding to two series S ð1Þ and S ð2Þ .
(ii) Inverse with Previous Mother (PM-Inverse). For all the levels from level h − 1 to level 1, we use mother wavelets corresponding to the first series S ð1Þ . Figure 1: Illustrations of Remark 4.  For a set of k time series, we execute the same procedure given in Step 4 (i.e., taming already tamed series with the next series adhering to weighted averages). We denote UTS obtained by taming at level h as UTS-L h , and to distinguish under AM-inverse and PM-inverse, we further denote it as UTS-L h (AM) and UTS-L h (PM), respectively. UTS-L 1 stands for the same UTS formulated in Section 3.2. In this manner, we can generate a pool of consensus series giving options for customizing.
Remark 7. UTS-L h (PM) is biased more to the pattern of earlier series than the latter series in the hierarchy (order) of taking time series into the taming procedure. It is because of taking new mother wavelets as the mother wavelets of the first series (or already tamed series). UTS-L h (AM) is unbiased in that sense.
We further discuss about hierarchy of taming in the Section 3.5.

Well-Posedness of H v -Transform and Its
Inverse. This subsection presents well-posedness of H v -transform and its inverse enclosing existence, uniqueness, and continuous change of the concerned series. We assure these properties for a given set of data series subject to a given coupling method (1 st or 2 nd ) and for a given mother wavelet for inverse (AM-inverse or PM-inverse). Both H v -transform and its inverse are encountered here. Without loss of generality, we articulate propositions between level 1 and level 2 that can be generalized between level h and level h + 1.
Proposition 8 (existence). There exist father and mother wavelets of level 2 corresponding to two-tuples of father wavelets of level 1 (via H v -transform) and vice-versa (via inverse Proof. This result is straightforward by Definition 1 applied to the series of father wavelets of level 1 and Definition 2 applied to the inverse operations.  Proof. It is enough to show the result for one two-tuple as the same can be repeated throughout. Suppose ð f 1 , f 2 Þ is a twotuple of father wavelets of level 1 corresponds to father wavelet F 1 and mother wavelet M 1 of level 2. Then, we have the following two linear systems by adjusting right-multiplying into left-multiplying appropriately. Since  ). Observe that For a given ε > 0, there exists δ = 2ε > 0 such that jf we can show that, jf − M 1 j < ε, establishing Proposition 10 (i). For (ii), observe that For a given ε > 0, there exists δ = ε/2 > 0 such that j F Similarly, we can show that, jF When wavelets are close, resulting new wavelets by the taming criteria are also close to corresponding wavelets. Then, the resultant UTS is also close to two time series verifying Proposition 10 (ii). This is illustrated in Figures 4(c) and 5(c).

Hierarchy for DTWS and UTS.
As seen in formulation, both DTWS and UTS vary according to the hierarchy (order) of taking time series into the taming procedure. In our trials, we focus on two specific hierarchies based on variations of consecutive data points. As an aggregated measure, we consider sum of squared differences of consecutive data points of each series. ; i = 1, 2, ⋯, k. Now the set of time series is hierarchically arranged according to the ascending and descending order of A ðiÞ values. Thus, we look forward to immediate closeness/variation of data points rather than their magnitude. A ðiÞ of a particular series S ðiÞ does not depend on other series. In addition, it caters every consecutive variation without restricting to two-tuples in coupling technique. There-fore, hierarchy does not depend on coupling technique. These characteristics motivate deciding hierarchy via A ðiÞ .

Tools for Comparison
The main task of this paper is to compare UTS-L h , DTWS, and the mean series in the sense of grasping consensus patterns of a set of time series. Meanwhile, one can see how far central tendency can be reflected by UTS-L h measures. By central tendency, we mean how each entry in a consensus series represents the center of corresponding data points. We introduce two comparison tools: Euclidean distance and DTW distance between series are utilized. They are the wellknown distance measures used in similar work [9,12,31].

Euclidean Distance.
Point-wise squared deviation is taken in the Euclidean sense to estimate central tendency acquired by consensus series. The Euclidean distance between a consensus series C = fc n g 2N n=1 and each time series S ðiÞ = fs ðiÞ n g 2N n=1 ; i = 1, 2, ⋯, k (say P i ðCÞ) is given by Next a representative of P i ðCÞ ; i = 1, 2, ⋯, k should be determined (say PðCÞ) for comparisons between consensus series. Thus, PðCÞ represents overall deviation of time series

Dynamic Time Warping
Distance. The string metric D in Section 5 yields the optimal warping path generated for two time series. We can make use of this measure to quantify the similarity between a consensus series C = fc n g 2N n=1 and each data series S ðiÞ = fs ðiÞ n g 2N n=1 ; i = 1, 2, ⋯, k in the sense of pattern. Suppose D i ðCÞ stands for that similarity between C and S ðiÞ (i.e., D i ðCÞ = DðC 2N , S ðiÞ 2N Þ). This comes recursively via Equation (7), which is in accordance with Equation (1).
We recall that lesser D indicates more similarity in patterns. A representative DTW distance can be obtained by taking an appropriate central measure (e.g., mean or median) of D i ðCÞ ; i = 1, 2, ⋯, k (say DðCÞ). Thus, we expect DðCÞ to represent overall deviation of time series from a consensus series C in the sense of pattern. Determining DðCÞ and PðCÞ is further discussed in Section 6.2.
Remark 12. Suppose C ð1Þ and C ð2Þ be two consensus series of the same set of time series. In summary, if DðC ð1Þ Þ > DðC ð2Þ Þ then we would expect time series are more deviated from C ð1Þ than C ð2Þ when pattern attributes are concerned. If PðC ð1Þ Þ > PðC ð2Þ Þ then C ð2Þ shows more central tendency than C ð1Þ .

Data Processing
We test consensus series using two data sets from UEA & UCR Time Series Classification Repository, namely, OSU-Leaf and Yoga [24] (http://www.timeseriesclassification .com). All the data series are stored as normalized series by z-scores. It is a usual measure for many experimental settings in pattern recognition [12,32]. Such normalization is compatible with the work of UTS too. OSULeaf data set contains one-dimensional outlines of leaves obtained by colour image segmentation and boundary extraction from digitized leaf images of six classes. Angles measured at each pixel point along the boundary of leaves form a set of series. We are motivated to choose this particular data set due to shifted fluctuating patterns in different phases. In order to preserve the meaning of summarizing a set of time series, we stick into a one class of data, class six, which includes 15 time series each having 427 data points. Note that to see a complete decomposition up to a certain level, say level h, we need number of data points to be divisible by 2 h . We choose first 384 consecutive data points to attain maximal comparison up The second data set, Yoga, has been generated by capturing two actors transiting between yoga poses in front of a green screen giving to two classes of data. Each image has converted to a one-dimensional series by finding the outline and measuring the distance of the outline to the center. That is, the motion of an actor captured by sensors is transformed to a time series. We proceed with class 1 containing 137 series. Out of 426 data points, we proceed with the first 384 consecutive data points, again to compatible with seven levels of UTS.
All 15 series of OSULeaf data are shown in Figure 6(a) along with the mean series and DTWS. Figure 6(b) depicts those of Yoga data. Here, only a few of data series (15) are shown for clear appearance, picking every 10 th series in the   Journal of Applied Mathematics ascending order of A ðiÞ (see Section 3.5) and the series having the least and the highest A ðiÞ . Notably, two cases of DTWS of OSULeaf data follow opposite patterns (increasing and decreasing) in many segments of time-points. However, Yoga data do not show such a significant difference in pattern. Sensitivity of ascending and descending hierarchies to the pattern of UTS-L h can be scrutinized later in Section 6.

Results
We present consensus series (UTS-L h , DTWS, and the mean series) in a systematic way for comparisons. Applicability of UTS-L h is overseen on top of DTWS and the mean series.

Illustrations of Consensus Series.
We illustrate results on four pillars: (i) coupling approach-1 st coupling and 2 nd coupling (from Section 3.1), (ii) taming levels and mother wavelet for inverse-average mother (AM-inverse) and previous mother (PM-inverse) (from Section 3.2.1), (iii) hierarchy of data series-ascending and descending (from Section 3.5), and (iv) comparisons-via the Euclidean distance and DTW distance (from Section 4). Pattern recognition becomes more challenging when adjacent data points are highly varied in dissimilar way. If it is required to prioritize sizable adjacent variations, the preferable combination is to execute descending hierarchy with PM-inverse. As projected by Remark 6, new wavelets in taming level are biased on that of first series. Therefore, descending hierarchy brings   In the other extreme, ascending hierarchy with AMinverse yields much smoothed output close to the mean series. It seems OSULeaf data do not show significant adjacent variations. It is observed in Figure 7 that even descending hierarchy with PM-inverse provides UTS-L h , h = 1, 2, 3, 4, more or less the same as the mean series. In general, if we see this similarity until we proceed into higher levels, then we have less variation in early windows of temporal proximity.

Journal of Applied Mathematics
Once we consider the wavelet-based temporal aspect, four windows relevant to UTS-L h , h = 1, 2, 3, 4, consist of 2tuples, 4-tuples, 8-tuples, and 16-tuples, respectively. This is due to each wavelet in level h is responsible for 2 h data points (Section 3.2.1). Next, UTS-L 5 has a window of 32 data points, where a wavelet in level 5 is obtained using averages of 16tuples. Thus, taming at level 5 deals with pattern of the series of 16-tuple averages. According to Figure 8, UTS deviates from the mean series, in particular with PM-inverse, suggesting considerable variations in 16-tuple averages. In 16-tuple windows (between vertical lines), we have the relevant consensus series. It can be observed that two DTWS do not adhere to such localized patterns. Moreover, DTWS is highly sensitive to hierarchy (ascending/descending) in many windows.
A similar visualization is carried out for UTS-L 6 and UTS-L 7 in Figures 9 and 10, respectively. Note that UTS-L 6 and UTS-L 7 bring consensus patterns in 32-tuples and 64tuples, respectively. Now, UTS-L h follow the pattern with much relaxed localization. It is visually verified by closeness to DTWS than the mean series. In a holistic approach, a user can adjust the windows either by size or position to see respective consensus patterns, subject to the requirements of H v -transform. This customizing option facilitates a setting of moving-window that can be conceptualized analogous to moving-average.
Observe that skips appear in UTS-L h at the vertical lines separating windows. This is a result of independent backward calculation (inverse procedure) in each window that yields loss of connection across those vertical lines. In these trials of OSULeaf data, we used first 384 data points out of total length of 427 points. This is to satisfy the requirement of level 7, where the tail or rest of the data points cannot be compiled into one complete window. If someone needs to generate UTS-L h , say up to level 7 including the tail, we may select last 384 data points. This is only a matter of one input command in an algorithm for UTS-L h .
As a further verification, we produce the same illustrations for Yoga data (Figure 11). Here also, two DTWS fails 14 Journal of Applied Mathematics to show localized pattern attributes of the data series. However, both cases of (Asc., AM) and (Des., PM) show almost similar patterns compared to that of OSULeaf data. This interprets a lesser sensitivity of hierarchy in producing localized consensus patterns via UTS-L h . The same is hinted by the similarity of two DTWS in more nonlocalized aspect. In such a way, observation of UTS-L h along with DTWS yields more useful descriptive analysis of a set of time series. Next, we demonstrate consensus series associated with 2 nd coupling. As assured by general versions of Proposition 8 and Proposition 9, existence and uniqueness preserve for both couplings, subject to a choice for hierarchy (descending/ascending) and mother wavelet for inverse (AM-inverse/PM-inverse). Here, the aim is to see whether UTS-L h differ in general agreement shown by 1 st coupling. We proceed with 384 data points starting from the second point of OSULeaf data. Figure 12 illustrates UTS-L 1 -UTS-L 4 analogous to that of Figure 7. It demonstrates no significant difference showing slight wobbles around the mean series similar to 1 st coupling.   Figure 13 illustrates the rest of UTS-L h preserving similar windowing effect followed earlier, subject to a shift by one point. If UTS-L h (Des., PM) measures do not deviate much from 1 st coupling counterparts, then it is hard to expect deviations in other options of descending/ascending, AM-inverse/PM-inverse. Therefore, we present only that category showing comparison between 1 st and 2 nd couplings for the sake of brevity too. According to Figure 13, UTS-L h behave almost the same way in both the couplings.

Comparisons of Consensus Series.
Earlier section is devoted to visualize the behaviour of UTS-L h . In this section, we provide numerical quantification to how far they deviate from data series in the sense of the Euclidean distance and DTW distance. These two distance measures are presented in Section 4 as P i ðCÞ and D i ðCÞ, respectively, where i stands for data series and C is the concerned consensus series.
We have 15 data series for the trial of OSULeaf data. Table 1 contains basic statistics of corresponding P i ðCÞ ; i = 1, 2, ⋯, 15. Here also, we consider UTS-L h of descending hierarchy with PM-inverse and ascending hierarchy with AM-inverse. For brevity, only 1 st coupling is implemented. The Euclidean distances when C is the mean series and DTWS are also included as baselines for comparisons.
According to Table 1 The mean series shows the least mean, while DTWS leans towards the greatest mean. Therefore, UTS-L h are characterized with much compromised overall deviations. Mean increases when level of taming h increases in both cases of descending hierarchy with PMinverse and ascending hierarchy with AM-inverse. Notably, this guides that higher level taming directs to lesser concern on point-wise central tendency. Median does not show the same monotonic behaviour as mean. However, median of UTS-L h with higher h is closer to that of two DTWS than the mean series. It also shows the loss of point-wise central tendency. In contrast, we expect that UTS-L h with higher h reflect pattern attributes rather than point-wise location. To claim this, we present statistics of DTW distances in Table 2. This pattern-oriented characteristic can be declared as a key applicability of UTS-L h as consensus series.
According to Table 2 also, UTS-L h are in a compromised context as far as the mean series and DTWS are concerned. This is implied by acquiring the least mean by DTWS and the greatest mean by the mean series. The same is observed in median as well. Both mean and median decrease when level of taming h increases (except in median of UTS-L 6 (Asc., AM)), giving opposite to what we observe in Table 1. This verifies that UTS-L h with higher h align more with pattern attributes. Interestingly, UTS-L h still follow temporal windows, where DTWS is not abide by such localization.
The standard deviation of certain UTS is comparatively high. This may be due to outliers of distance measures resulting from outlier data series rather than unsuitability of UTS as a consensus series. Therefore, as a holistic view, we depict box-plot diagrams carrying statistics of above two tables in Figure 14. The boxes are generated for UTS measures at each level together with DTWS and mean series representative. The spread of Euclidean distances and DTW distances are produced for extreme hierarchies ascending with average mother inversion and descending with previous mother inversion to generate the box plots. Now, increasing trend in the Euclidean distance and decreasing trend in DTW distance as h increases are clearly visualized.
We demonstrate the same for Yoga data in Figure 15, and the same trends can be observed as in Figure 14. In a data mining process, one may investigate all those UTS-L h and select a fair enough representative for further work, knowing which temporal windowing prevails.

Discussion
Wavelet techniques are utilized in time series analysis in order to investigate trends, recurring fluctuations, and autocorrelation effects [33,34]. These applications refer to longitudinal aspect of time series. The approach via the discrete Haar wavelet proposed in this work adds on a utility in terms of cross-sectional characteristics of a set of time series. It is associated with the central topic of consensus patterns. Its novelty lies with the ability of customizing a consensus pattern by maintaining localized temporal concern in different extents.
The study is centralized around a pool of measures designated as Ultimate Tamed Series (UTS). A theoretical platform is also established enclosing existence, uniqueness, and continuous dependency (Proposition 8, 9, and 10). Implementation of UTS in different hierarchies (ascending and descending), taming levels and inverse procedure (AM-inverse and PM-inverse), and coupling formation (1 st coupling and 2 nd coupling) bring the essence of the overall performance, again highlighting customizing options. Hierarchical arrangement facilitates bringing adjacent variations of data points into proposed consensus series. A window of 2 h data points is catered at a time in taming by level h. UTS-L h measures owe this characteristic by the routine set by the discrete Haar wavelet decomposition. Wavelet approaches gain their reputation due to such localized treatment as evident in many applications [35][36][37]. In fact, father wavelets in different levels allow rescaling data series, while mother wavelets affix localized trends. The work relevant to this begins in Definition 1 (H v -transform), and it is further illustrated in Figure 3.
If we shift the implementation of UTS by one point of each data series (2 nd coupling), then all outputs are different. We accept this as an optimistic feature than a limitation, since more pattern attributes can be extracted. Both classes of UTS (1 st and 2 nd couplings) show similar pattern if there are no contrasting variations because of the shift, which is the case for trialed data in this work (Figures 12 and 13). Otherwise, it is preferred to determine UTS-L h for both couplings in all illustrations since we identify discrete Haar wavelet as a weak form (Section 3.1).
As baselines, we consider two consensus series, the mean series (series of point-wise averages) and Dynamic Time Warping Series (DTWS), to show how far UTS-L h can illustrate patterns emphasizing local attributes. Note that we have illustrated normalized data series, and hence, the mean series acts as a guide for over-smoothed representation for pattern. Option of PM-inverse avoids over-smoothing, which is often the main advantage of UTS-L h over the mean series. Higher level UTS-L h visualize pattern attributes fairly, while lower level UTS-L h locate closer to the mean series. By moving back and forth with different levels of taming, one can extract important characteristics of a set of time series. Thus, UTS-L h measures are pooled as a collection of statistics, where a user can see more complete profile rather than seeing one consensus series. Its computational burden is redundant in modern computer technology. A DTWS (without scaling) Figure 15: Box-plot diagrams of the Euclidean distances and DTW distances (lower box limit: 1 st quartile (Q 1 ), upper box limit: 3 rd quartile (Q 3 ), middle line: median, cross ( × ): mean, lower whisker: Q 1 − 1:5 IQR, and upper whisker: Q 3 + 1:5 IQR). Data track: Yoga data. Journal of Applied Mathematics is substantially longer compared to the original series. This expansion happens in a nonlinear manner so that uniform scaling techniques may not align the series properly to the temporal axis. Therefore, improved versions such as NLAAF and PSA [14,26] can be tested with UTS-L h in a future work.

Conclusion
UTS-L h bridge the gap between the mean series and DTWS in the sense of displaying consensus patterns. The classical DTW approaches only recognize patterns somewhat neglecting the correspondence to the temporal axis while the mean series restricts into point-wise concerns. UTS-L h with different levels of taming allow seeing consensus patterns by expanding and shrinking the localization of time-points (Figures 14 and 15). We verify these effects via two comparison tools: Euclidean distance and DTW distance.
UTS-L h can also be tested for data sets that are highly varied. For that, clustering tools must be proposed to see informative consensus patterns. Several motivations can be obtained by existing clustering algorithms including well-known k-means [32,38,39]. In the broader scope of data mining, one needs not only extracting important data but also extracting useful patterns [40]. Thus, we further propose UTS as a technique for mining consensus patterns of sequential big data.

Conflicts of Interest
Authors declare that there is no conflict of interest.