On Similarity Measures for Stochastic and Statistical Modeling

: In this work, our goal is to present and discuss similarity techniques for ordered observations between time series and non-time dependent data. The purpose of the study was to measure whether ordered observations of data sets are displayed at or close to, the same time points for the case of time series and with the same or similar frequencies for the case of non-time dependent data sets. A simultaneous time pairing and comparison can be achieved effectively via indices, advanced indices and the associated index matrices based on statistical functions of ordered observations. Hence, in this work we review some previously deﬁned standard indices and propose new advanced dimensionless indices and the associated index matrices which are both easily interpreted and provide efﬁcient comparison of the series involved. Furthermore, the proposed methodology allows the analysis of data with different units of measurement as the indices presented are dimensionless. The applicability of the proposed methodology is explored through an epidemiological data set on inﬂuenza-like-illness (ILI). We ﬁnally provide a thorough discussion on all parameters involved in the proposed indices for practical purposes along with examples.


Introduction
In time series analysis, in addition to trend, seasonality, periodicity and stationarity, another concept of great significance is the similarity between two or more time series. The similarity between two or more time series focuses on the study of similarities and common changes between the series. Different techniques have been proposed over the years for measuring similarities like simple mathematical measures (see, e.g., ( [1,2]), data transformations (see, e.g., [3]), algorithmic methods (see, e.g., [4]) or measures of divergence (see. e.g., [5][6][7][8]). Finally, measures of dissimilarity have been thoroughly studied (see, e.g., [9][10][11]).
Data series and, in particular, time series analysis involve, among others, pattern matching, anomaly identification and frequent pattern detection. All these tasks are directly associated with time series similarity techniques, some of which are mentioned above. We observe frequently that data series similarity is visualization-dependent. Indeed, it is quite common, for instance, that neuroscientists manually inspect the electroengephalogram (EEG) data of their patients, using visual analysis tools, so as to identify patterns of interest (see, e.g., [12]). Surveillance systems also rely on visual tools to monitor incidence data and compare the disease behavior in various regions for the purpose of predicting or hopefully preventing an epidemic. Finally, physiologic time-series databases often require finding similar temporal patterns of physiological responses resembling those of a prototype case (see, e.g., [13]). Detection of these complex physiological patterns not only enables demarcation of important clinical events but can also elucidate hidden dynamical structures that may be suggestive of disease processes. In all such cases, it is important to have similarity techniques, which in conjunction with visual analysis tools will enable analysts to complete their tasks quickly and accurately.
In this work, our goal is to present and discuss similarity techniques for ordered observations between time series and non-time dependent data. The coupling analysis can be obtained via a direct method ( [1]) which is a simple squared measure of distance between two series.
Since we are focusing on similarities between two series, the comparison can be achieved more effectively via indices, advanced indices and the associated (index) matrices. More specifically, as we can see below, the comparison concentrates on the extreme parts of the series and the index quantifies the degree of similarity between these specific parts of the series. In general, such indices referred in this work as MKN indices, compare the simultaneous time pairing of the K maximum and/or minimum values (denoted by the parameter M) between N time series based on some statistical function denoted by µ. A standard MKN index was formally defined in [1]. Applications of such indices include the measuring of displacements, rotations, moments and forces for two types of floating wind turbines ( [14]) and epidemiological data ( [15]).
For details on the origin of these ideas, one may refer to a review paper by Makris et al. ([16]).
In this work, we present the evolution of the idea of the similarity indices and propose advanced dimensionless indices and the associated index matrices which are both easily interpreted and provide more effective comparison of the series involved than the one achieved by the standard indices previously proposed. The rest of the paper has been organized as follows. In Section 2, we present some preliminary definitions and review results about standard indices illustrated by an example. A generalization to the multivariate case is also presented. In Section 3, we propose new advanced dimensionless indices and index matrices for efficient comparison of time series. A discussion on the related concept of cointegration is also included. In Section 4, a dataset on influenza-like-illness (ILI) cases in Greece is examined for illustrating the usefullness and the importance of the proposed methodology. In Section 5, we discuss the parameter µ and present an application of the indices in economics and marketing defining a novel elasticity. In Section 6, we study the effect of the parameter M and in Section 7, the indices are defined for non-time dependent data and a modified direct measure for this type of data is also discussed. Finally, in Section 8, we discuss the parameter N and its possible reduction in size. The paper concludes with some general comments and conclusions.

Preliminary Definitions
Most of the quantities defined in this work depend on three parameters which are denoted by M, K and N where • M takes two values M = Min ≡ 0 and M = Max ≡ 1 depending on whether we are dealing with the maximum or the minimum values of a series or a data set, • K represents the number of ordered observations used for the analysis, K ∈ {1, . . . , n} where n is the sample size and • N is the number of time series or data sets involved in the analysis with N ≥ 2.
A class of dimensionless indices was recently defined by Makris and Vonta [1] that depends on a basic statistical characteristic µ like the mean (average), the variance, correlation, etc. of K ordered (largest or smallest) observations of a series. More specifically, a basic characteristic of K ordered observations is compared (through division) with a basic characteristic of all (total) observations involved in the analysis, with the latter not necessarily the same as the one used for the K ordered observations. The indices are considered to be dimensionless since we divide the same type of quantities (the same statistical characteristic). Even if two different characteristics are used, the index will remain dimensionless as long as the characteristics are in the same unit of measurement (e.g., mean for the numerator and standard deviation for the denominator or vice versa).
For the definition, consider two time series i and j and let t i (k) the time point at which the kth ordered observation of the series i has occurred. Having available K time points corresponding to the K largest (or smallest) ordered observations of a time series i, which plays the role of the basis for the index evaluation, we proceed and calculate the basic statistical characteristic µ of the K observations of the second series j conditionally on the time points that the baseline time series i displays its K largest (or smallest) values.
Definition 1 (see [1]). For two time series i and j, the µ j|i index is defined by where the notation t i {K} denotes the K time points where the series i displays its K smaller values and t i {n−K+1} the K time points where the series i displays its K larger values. In addition, j Total is the notation for all the observations of the time series j.
Observe that the above index can be obtained using as a basis the series j, resulting in the index µ MK2 i|j . Naturally the index is not symmetric since the time points of the K ordered observations of one series do not necessarily occur at the exact same time points of the other series. Extending the idea of the above index one could also evaluate the index for the same series obtaining the indices µ MK2 i|i and µ MK2 j|j . The combination of the above indices can be represented in a 2 × 2 matrix which, in general, is denoted by [µ] MKN where µ represents the statistical function (characteristic) to be used in the analysis. The matrix created below refers to the case of the K smallest observations of the baseline series i when the basic characteristic µ is the standard deviation (Std): From the matrix above, observe that the diagonal elements refer to the baseline time series itself while the off-diagonal elements refer to one time series conditionally on the ordered time points of the other. Thus, the evaluation of the statistical characteristic (the standard deviation here) for each row k of the matrix is done conditionally on the time series k.

Remark 1.
Note that in some instances the numerator will be always smaller or larger than the denominator. Indeed, if the mean (average) is used as the statistical characteristic then for the diagonal elements, the numerator will be always smaller than the denominator if the K smallest observations are used and larger if the K largest observations are used. In addition, in the case where the maximum values are studied, it is valid that the values of the indices that appear in the diagonal elements are most often larger than the off-diagonal elements in the same row and this is because the values in the same row are calculated conditionally on the time points where the diagonal elements are defined (see Example 1 below). In the case where the minimum values are examined, the elements in the diagonal most often take the minimum values in each row due to the same conditional argument.
The general form of the matrix for a general statistical characteristic µ for N time series given in [1] is of dimension N × N and is presented as follows: In the case where the maximum values are studied (M = Max) and there are ties, for example when a value, say i (k) , is tied with other values within the range under investigation, e.g., i (n) , . . . , i (n−K+1) , then we select among those time points the one that maximizes the index µ MKN in the remaining N − 1 time series because this way, we are being more conservative in terms of the similarity between the N series. Notice that the time point that provides the maximum index for each of the remaining N − 1 time series might be different for each series. This remark will be become clear in the following example. Analogously, for M = Min we will be choosing each time the time point that minimizes the index in the remaining N − 1 time series.
Based on Remark 2, the first row of the matrix [AV] Min23 is given as 0.47 0.53 0.52 .

Multivariate Indices
For a better comparison between time series, a multivariate index could be used based not on a single but rather on multiple statistical characteristics. Thus, µ could be increased in dimension in order to include more than one statistical functions and be a vector of higher dimension. For example, for the control of four statistical characteristics simultaneously (i.e., average [AV], standard deviation [Std], coefficient of variation [CV] and covariance [Cov], the index µ can have dimension four creating a generalized matrix We should stress that each element of the matrix (3) is itself a vector of dimension 4, which contains the values of the four indices that correspond to the four statistical measures, for the case under consideration.
Multivariate indices could become extremely useful in stochastic ordering and majorization both of which play a key role in many areas of statistics as for example, in reliability theory and engineering. For instance, in regard to majorization, an n−dimensional vector x is said to be majorized by another n−dimensional vector y, denoted by x where x (i) and y (i) refer to the ordered elements of the two vectors. We use the term strict majorization if in the above we use strict inequality. Furthermore, if the inequality holds for all js including the case j = n, we are dealing with weak majorization. For details about majorization please see [17].
Before closing the section and moving to the next one where some new advanced indices will be proposed, it is important to mention that the indices discussed in this work are applicable to both stationary and non-stationary processes. Although the series to be compared are expected to be of the same nature and as such the comparison is meaningful, in general, the use of stationary or non-stationary data and whether a differencing should be applied, is a challenging problem within the framework of similarity measures, that goes beyond the scope of the present work and is left as an open problem for a future project.

Advanced Dimensionless Indices
For better and efficient comparison between series, we propose in this section two new advanced index matrices that depend on the same three parameters M, K and N as the ones in Definition 1. The first index matrix is obtained when each element of each row in matrix (2) is divided by the diagonal element of the same row. The resulting new index matrix is denoted by [µ 1 ] MKN . As expected, this matrix has all its diagonal elements equal to one while all off-diagonal elements take non-zero values.
In a similar way, we propose the 2nd index matrix [µ 2 ] MKN where each element of each column in matrix (2) is divided by the diagonal element of the same column. Both index matrices can be viewed as similarity measures between the series involved. The proposed index matrix measures are given below: and The above proposed advanced MKN indices (index matrices) are dimensionless while their interpretation is much more clear than that of the standard indices presented in Definition 1 because they provide efficient pairwise comparison in pairs between series and could be considered as the percentage of similarity between two time series i and j. For instance, if for the matrix µ 1 the value of the (1, 2)-element µ 1 (1,2) = 0.75, this means that the second time series is 75% similar as compared with the first series, or in other words, the index of the second series is 75% the value of the corresponding index of the first series, when the calculations are conditional on the time points where the first time series achieves its K maximum or minimum values. The conclusion is the same if this index turns out to be equal to 1.75.
The = 1, then this means that the second time series presents its K maximum values at the exact same time points as the first time series, and vice versa, if time series 1 has index µ MaxKN 2 (2,1) = 1, then the first series presents its maximum values at the same time points as the second series. In fact, in general, we have: Although this work is devoted to similarity, we cannot overlook the fact that it is, at the same time, interrelated to the concepts of causality and cointegration which are briefly mentioned below for the sake of completeness. The notion of causality is rather common in economic time series although causality issues could also be found in reliability or engineering. The difficulties of establishing a causal relationship between economic variables led Granger ([18]) to develop the economic concept of causality known as Granger Causality. On the other hand, the concept of cointegration was established later and discussed thoroughly in [19] where the associated statistical inference including tests used to identify the long-term relationships between two or more series, was explored. The phenomenon is also quite common since, in general, economic theory forces certain pairs of series staying close to each other and moving alongside. For testing cointegration, one could use the Engle-Granger Augmented Dickey-Fuller test for cointegration (EG-ADF test, [19]) based on the classical Dickey-Fuller test, if two series are involved or the Johansen test if more than two series are involved ( [20]). For further reading, the interested reader is referred to [21,22] and to the interesting review article by Hubrich et al. [23].
In Microeconomics, another concept closely related to the above is the concept of elasticity which is a measure of the sensitivity of a variable to a change in another variable. For instance, although the prices of some goods are inelastic, this is not always the case. This issue, which is of great importance in marketing, is explored through an example in the following section where a special price elasticity index is presented and discussed.
In the sections that follow, the quantities that play a key role in the analysis of the proposed index matrices of this section, namely the function (or characteristic) µ and the parameters M, K and N, will be thoroughly explored.

An Epidemiological Application
In this section, we examine time series on influenza-like-illness (ILI) rates for the purpose of identifying differences between (geographical) regions as well as differences between each region-rate and the country-rate. Usually, the purpose of such analyses is the identification of areas for which further monitoring and actions for reducing the spread of a disease are needed.
The data have been drawn from the Sentinel system of the Hellenic National Public Health Organization (EODY) for the period 2004-2014. From the data entered into the system by the physicians, the ILI rate is calculated weekly as the number of ILI cases per 1000 visits (1000*cases/visits), a rate that displays the spread of the disease to the community.
In this work, we will present and compare six time series which report the weekly ILI-rate for the time period of the 28th week of 2004 up to and including the 39th week of 2014 in four geographical regions in which Greece is divided. The time series which report the ILI-rate for the four regions will be denoted by ILI-1 to ILI-4. For the entire country, two series are available, the overall ILI-rate as a weighted average of ILI-1 through ILI-4 (based on appropriate weights depending on the population size per region), denoted by ILI and the ILI-total that reports the total number of cases per 1000 visits (1000*cases/visits). Through the matrix [µ] MKN given in (2), we compare the similarity of the six time series based the µ MKN indices where the parameter µ is the average, N = 6, M = Max and the parameter K takes two values, K = 10 (Table 3) and K = 20 ( Table 4).
The µ MKN (1|1) element of the matrix in Table 3 is equal to 8.6051 which means that the average of the 10 largest observations of the series ILI is about 8.6 times bigger than the average of all ILI observations. Observe that the average of the 10 observations of each of the series ILI-1, ILI-2 and ILI-3 (8.2869, 8.4281, 8.4036) evaluated conditionally on the time points where the country-rate displays its 10 largest observations, are very similar but the same is not true for the 4th country region where a much lower similarity value is observed (7.6249). This implies that the rate of the disease in that specific region (Aegean Sea islands and Crete) is not as high as in all other regions. The time series ILI-total displays an even smaller similarity (7.36) with the time series ILI, a fact that is probably attributed to the better definition of the ILI-rate as a weighted average of ILI1−ILI4.
From the results of Table 4 (for K = 20), we observe that all diagonal elements as well as almost all off-diagonal elements are reduced in size as compared to the elements of Table 3. Observe that as K increases, the diagonal elements approach 1. The matrix [µ 1 ] MKN given in (4) for µ 1 being the average and K = 10 is presented in Table 5. According to the definition of [µ 1 ] MKN , the diagonal elements are all equal to 1. Observe that the first three geographical regions display very similar behavior as compared with the country-rate (ILI) with values at least equal to 96%, while the fourth region is much less similar (88% similarity). In Table 6 for K = 20, we observe that the differences between all time series are alleviated and the indices approach 1. The fourth geographical region constitutes an exception since it reaches about 88% similarity as compared with the whole country and even less similarity as compared with the other three regions. Epidemiological differences accurately identified among regional series are useful to health officials since they provide a useful tool for identifying, as early as possible, disease outbreaks in certain regions and is beneficial to the society in general, for early detection, prevention and spread of extreme, possibly harmful, events.

The Function µ
The measure µ which refers to the ratio of the statistical functions considered is an important factor in the analysis of the data through the indices.
In previous sections µ was chosen to be a basic statistical function like the average, the standard deviation, the coefficient of variation, etc. In this section, we deal with the case where µ is a differential (backshift) operator denoted by d referring to the first differences of a time series. We denote by d K the differential based on first differences between the K maximum (or minimum) values of a time series. Thus, d K is a K − 1 dimensional vector defined by (i (n) − i (n−1) , i (n−1) − i (n−2) , . . . , i (n−K+2) − i (n−K+1) ) while d T denotes the operator applied to all (total) values of the time series and is of dimension n − 1. The corresponding index is defined below.
with an alternative version being defined as where the denominator relies on any statistical function including any ordered observation. Indeed, in (7) with M = Max and K = 2, the operator d can be the classical first difference between the two largest observations for the series i, namely i (n) − i (n−1) divided or weighted by either the mean of all observations (see (8)) or the maximum of the two largest values (see (9)) or the minimum among the two largest observations (see (10)). Observe that the last one is nothing but the well-known relative or percentage change. The relevant expressions are provided below: and In contrast to the above definitions, the index (11) calculates the ratio of two indices. More specifically it calculates the ratio of the percentage change of the time series i to the percentage change of the time series j conditionally on the time points the time series i displays its K maximum (or minimum) values. A comment would be that the function d T could be equal to 1 or any other constant. Its existence is to achieve weighting and to ensure the dimensionless property of the indices.
We define the new index as Example 2. For the case of the index defined in (11), and for the case of three maximum values of the time series i, (i.e., K = 3) a vector of dimension 2 can be derived in the numerator of the index and therefore the index is actually the 2-dimensional vector while for M = Min and K = 4 we have Example 3. (Price elasticity of demand). The index defined in (11) has many applications, mainly in economics and marketing. For example, if the time series i in (11) is the demand for a good, say A, measured in Q units and if the time series j reports the corresponding price values, say P, of the good, then the resulting index is a measure of the response of the maximum (or minimum) quantity demanded of a good, relative to the change in its price, with all other factors considered constant (see index (15) below). In other words, the index expresses the percentage change of the maximum (or minimum) quantity demanded of the good to the percentage change of its price, known as the price elasticity of the maximum (or minimum) demand denoted by E (D,Q,Max) , i.e., a novel form of the known price elasticity of demand E D ( [24]). For the classical case with K = 2 for two series, we have which can also be denoted by where ∆Q (n) stands for the ratio . Note that in the general K case we have It should be noted that if the price is replaced by income then the resulting index will be a novel elasticity of demand for income while if the price is substituted by demand for a complementary good (relative to good A) the resulting index will be a novel cross-elasticity of demand.

Parameter M and Cross-Correlation Indices
The values of the parameter M, one involving the minimum (M = 0) and one the maximum (M = 1) values of a data set, can be used in combination, connecting maximum and minimum values between time series simultaneously. This proposal, that is, to connect the occurrence of maximum and minimum values between time series, is inspired by variables that are complementary, such as the prices of two substitute goods (such as the matches and the lighter), where, as it is well-known when the price of a good rises the price of the substitute good goes down, with the result that at the time points one good receives its maximum prices, the other (namely the substitute good) receives its minimum prices.
For two time series i and j, when we are interested in comparing the information from the maximum and the minimum values simultaneously, we propose the definition below with the notation µ M Based on the definition (17), a matrix defined in (18)   , then this means that wherever the time series 2 presents its maximum values, the time series 1 presents its minimum values. One of the aforementioned results does not imply the second and vice versa, but when both are valid then there will be a time cross correlation between the two time series in terms of their K maximum and minimum values.
Caution is required for the possibility of spurious correlation. Since the cross-correlation mentioned earlier may be due to the presence of a hidden, confounding factor, certain measures should be taken for investigating such a possibility. It should be noted that spurious correlation is not uncommon and it is surfaced not only in economics and finance but also in behavioral sciences.

Parameter K
The parameter K is the most important parameter for the indices µ MKN , as it is the one that affects the condition under which the calculations of the numerator of the indices is being done. In this section, a change in the calculation condition will be presented and various cases will be discussed through examples.
In the previous sections, the indices were defined for time-dependent data (time series). In this section, the indices will be defined for data sets which are independent of time. The parameters µ, M and N remain unchanged as in the previous sections in terms of definitions, while the parameter K in the setting of this section corresponds to the frequency of occurrence of K distinct maximum or minimum values (as opposed to correspondence with the time points of occurrence of K maximum or minimum values).
Consider two random variables X and Y. A random sample (X 1 , . . . , X n ) is drawn from the same distribution as X and similarly a random sample (Y 1 , . . . , Y n ) is drawn from the distribution of Y. The ordered realization samples are defined as (X (1) , . . . , X (n ) ) and (Y (1) , . . . , Y (n ) ), respectively.
Furthermore, consider the ordered realizations of distinct values in each data set, that is, (x (1) < x (2) < . . . < x (n 1 ) ) and (y (1) < y (2) < . . . < y (n 2 ) ) and let the corresponding frequencies of occurrence for each ordered distinct value of X and Y be ( f X (1) , . . . , f X (n 1 ) ) and ( f Y (1) , . . . , f Y (n 2 ) ), respectively. We define indices between the two variables X ≡ i and Y ≡ j as follows which for N series can be summarized in a N × N matrix as follows We should point out here based on the above, that • The realizations of the random variables X = i and Y = j are of the same length but not necessarily with the same number of distinct ordered values.
. . , f i (n i −K+1) } is the notation for the collection of frequencies with which the K distinct maximum observations of the variable i occur and similarly . . , f i (K) } is the notation for the collection of frequencies with which the K distinct minimum observations of the variable i occur. , we evaluate whether two data sets have their K maximum distinct values occurring with the same frequencies. A similar result holds for M = Min.
• Let the notation X {n 1 −K+1} stand for the collection of distinct ordered times of the data set X of the form {x (n 1 ) , . . . , x (n 1 −K+1) }. We consider a similar notation for the data set Y.
An example will be presented below for a better understanding of the concepts.
Example 4. Let K = 2, M = Max and N = 2 and focus on the frequencies of occurrence of the first two distinct maximum values of a realization of the random variable X. Let also a realization of a random variable Y. Suppose that x (n 1 ) appears f X (n 1 ) times and x (n 1 −1) appears f X (n 1 −1) times, so that the calculation of an index of X based on itself, with the parameter µ defined as the average (AV), is as follows: For the evaluation of the index for Y calculated based on the frequencies of the K maximum distinct observations of X, we have Y .
Observe that for K > 2 the above expressions take the form and The above quantities are naturally rewritten in case the roles of X and Y are reversed so that the indices are calculated conditionally on the frequencies of K distinct maximum values of the random variable Y.

Direct Measure Based on Frequencies
In this subsection, we propose and briefly discuss a special measure V defined for the purpose of comparing directly the frequencies of K distinct maximum (or minimum) values of two data sets that do not depend on time. The definition of the V measure applied to frequencies is based on the definition of the direct measure V of Makris and Vonta ([1]) defined for time points. For two non-dependent data sets which are realizations of size n of two random variables X and Y, we have where f Q (k) is the frequency of the kth distinct ordered observation of the random variable Q. Observe that The above properties imply that the measure is a proper statistical measure.

Parameter N
The parameter N stands for the number of data sets (which may be time dependent or not) that are analyzed, thus creating in each case an index matrix of dimension N × N.
In case many data sets are to be analyzed, namely the value of N is large and therefore the Matrix [µ] is difficult to deal with, there is a need to discard some data sets that are not important to be present in the analysis (e.g., when the values of the µ indicators are very small). We introduce therefore an additional parameter ν and we have a new notation N [ν] which displays the dependence of N on ν. Our purpose for doing that is to discard from the final analysis those data sets that are not significant based on a criterion.
The criterion for keeping a data set is its closeness to another data set which can be measured by a typical distance, e.g., the Euclidean distance or the absolute value based on the indices µ MKN (i,j) . The selection of the data sets that remain in the matrix is performed in two steps. In the first step, the ν smallest absolute differences for j = 1, . . . , N, are kept in each row with the result being that the initial N × N matrix becomes an N × ν matrix. Let us, for simplicity, denote these differences by {d i1 , d i2 , . . . , d iν } for each row i = 1, . . . , N. In the second stage, the absolute differences on each row are summed up as s i = ∑ ν λ=1 d iλ , i = 1, . . . , N. Finally, the ν smallest of those sums are selected and the corresponding rows are kept into the matrix (so the N × ν matrix reduces to the final ν × ν matrix) and gives rise to a matrix denoted by [µ] MKN [ν] . To be more explicit, the resulting matrix contains the rows with row sum {s (1) , s (2) , . . . , s (ν) }

Conclusions
In this work, a method of data analysis was presented based on the indices µ MKN , which are calculated as a ratio of two statistical functions. We have studied the parameters involved in the indices and how these parameters affect the indices. More specifically, we examined the parameter (function) µ with various examples and an application to economics and marketing on price elasticity of demands. We have also studied the parameter M and how we can use the maximum and minimum values simultaneously to perform a cross-correlation of times. Furthermore, we examined the reduction of the size of the parameter N by discussing how some data sets that are not significant (important) to be present in the analysis, can be discarded (e.g., when the values of their indices are very big), namely, we reduce the size of the parameter N and thus the number of the data sets kept in the analysis. Finally, the indices for data independent of time (namely random variables) are discussed through explanatory examples.
The proposed indices can be used as powerful statistical tools in similarity matching problems involving pattern matching, anomaly identification and/or frequent pattern detection. The applicability of the proposed methodology goes beyond neuroscience or physiology and epidemiology all of which have been mentioned in this work. Indeed, such techniques can play a vital role in various scientific fields like financial mathematics, economics, management, geosciences, stylometry or music retreaval. Such examples include among many others, the identification of companies with similar growth patterns, products with similar selling patterns and seismic waves not similar in spotting geological irregularities. Finally, music retreaval and plagiarism in literature and music will greatly benefit from the implementation of the proposed methodology.