The FREQ test compares the frequency components of reference and observed data, attaining higher values when the qualitative dynamics of the two variables is comparable, regardless of relative magnitudes and phase. Of course this only applies to time series which are stationary, or can be transformed in such a way to make them stationary. When no periodic components can be detected in both the reference and observed data, the weight of the test is set to zero, so that the output will not have an influence in computing the global score. Otherwise the score reflects the similarity between the major frequencies found in the reference data and the ones found in the actual time series. It is assumed that the data do not have holes in them.
The FREQ score is computed in three steps. First, the periodogram of the reference and the actual data are computed using a fast Fourier transform algorithm on the differenced data. The periodograms are normalized, then a peak-detection algorithm is used to find out the important peaks and their corresponding periods. Last, the FREQ score is computed by comparing the common peaks and their strengths. Parameters can be used to fine-tune the peak detection algorithm and to specify an acceptable drift (in timesteps) within which the periods are to be considered comparable. This non-rigorous approach has been preferred over the cross-correlation approach due to its better performance in most cases, as it's difficult to obtain significant cross-correlations even when data have obvious periodic components which show up clearly in the periodograms.
When neither the reference and the actual data have recognizable periodicity the test weight is set to 0. The periodicities which are shown in the actual data but not in the reference data are ignored in the computation. The FREQ score depends on the periods in the reference data which appear also (within an accepted drift) in the actual data, and weighs each period's contribution according to its strength in the reference data. The FREQ score is computed as
![]() |
(13) |
where
is the distance between each peak in the reference data
and the nearest one in the actual data lying within D time units, and
is its relative strength (power) in the reference data frequency
spectrum.