View source: R/tquest_distance.R
TquestDistance | R Documentation |
Computes the Tquest distance between a pair of numeric vectors.
TquestDistance(x, y, tx, ty, tau)
x |
Numeric vector containing the first time series. |
y |
Numeric vector containing the second time series. |
tx |
If not constant, temporal index of series |
ty |
If not constant, temporal index of series |
tau |
Parameter (threshold) used to define the threshold passing intervals. |
The TQuest distance represents the series based on a set of intervals that fulfill the following conditions:
All the values that the time series takes during these time intervals must be strictly above a user specified threshold tau
.
They are the largest possible intervals that satisfy the previous condition.
The final distance between two series is defined in terms of the similarity between their threshold passing interval sets. For more information, see references.
d |
The computed distance between the pair of series. |
Usue Mori, Alexander Mendiburu, Jose A. Lozano.
Aßfalg, J., Kriegel, H., Kröger, P., Kunath, P., Pryakhin, A., & Renz, M. (2006). Similarity Search on Time Series based on Threshold Queries. In Proceedings of the 10th international conference on Advances in Database Technology (pp. 276-294).
Esling, P., & Agon, C. (2012). Time-series data mining. ACM Computing Surveys (CSUR), 45(1), 1–34.
To calculate this distance measure using ts
, zoo
or xts
objects see TSDistances
. To calculate distance matrices of time series databases using this measure see TSDatabaseDistances
.
# The objects example.series1 and example.series2 are two # numeric series of length 100 contained in the TSdist package. data(example.series1) data(example.series2) # For information on their generation and shape see help # page of example.series. help(example.series) # Calculate the Tquest distance assuming even sampling: TquestDistance(example.series1, example.series2, tau=2.5) # The objects example.series3 and example.series4 are two # numeric series of length 100 and 120 contained in the TSdist # package. data(example.series3) data(example.series4) # Calculate the Tquest distance for two series of different length: TquestDistance(example.series3, example.series4, tau=2.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.