2

I am going through this paper:

http://www.cs.ucr.edu/~eamonn/PID4481997_extend_Matrix%20Profile_I.pdf

And on Page 4, it is claimed that the squared z-normalized euclidean distance between two vectors of equal length, Q and T[i], (the latter of which is just the ith subsequence of a longer 1D array, T) can be calculated from:

enter image description here

Here, m is the length of Q (or T[i]), mu_Q is the mean of Q, M_T[i] is the mean for the ith subsequence of T, sigma_Q is the standard deviation of Q, sigma_T[i] is the standard deviation for the ith subsequence of T, and Q.T[i] is the dot product between Q and T[i].

I am attempting to derive this equation from first principals but can't see to reconcile the final steps:

enter image description here

In this case, the summation loops through each element of either T[i] or Q. Also, recall that:

enter image description here

I've gotten as close as this but it's not quite right:

enter image description here

A semi-related question is here.

slaw
  • 365

1 Answers1

0

I define a few symbols for brevity:

$$ X = T[i] $$ $$ µ_X = M_{T[i]} $$ $$ \sigma_{X} = \Sigma_{T[i]} $$

Starting from your first line in your second block:

$$ = 2m \biggl( 1 - { Q \cdot X - \sum x_i µ_Q - \sum µ_X Q_i + m µ_Q µ_X \over m \sigma_Q \sigma_X} \biggr) $$

$$ = 2m \biggl( 1 - { Q \cdot X - m µ_Q { 1 \over m} \sum x_i - m µ_X { 1 \over m } \sum Q_i + m µ_Q µ_X \over m \sigma_Q \sigma_X} \biggr) $$

$$ = 2m \biggl( 1 - { Q \cdot X - m µ_Q µ_X - m µ_X µ_Q + m µ_Q µ_X \over m \sigma_Q \sigma_X} \biggr) $$

$$ = 2m \biggl( 1 - { Q \cdot X - m µ_Q µ_X \over m \sigma_Q \sigma_X} \biggr) $$

DieterDP
  • 101