View source: R/Distance_matrix_knn_algorithm.R
distance_matrix_coherence | R Documentation |
Pairwise distance matrix of a multivariate time series based on computing the squared coherence and transformed it to represent a distance at a specific frequency
distance_matrix_coherence(unit, span1, span2, period)
unit |
A matrix representing a multivariate time series where each column is a univariate time series. |
span1 |
Odd integer giving the widths of modified Daniell smoothers to be used to smooth the periodogram. Refers to the bandwidth of the smoothing process. |
span2 |
Odd integer giving the widths of modified Daniell smoothers to be used to smooth the periodogram. Control another level of smoothing to the spectral density estimation without altering the peaks |
period |
Integer referencing the index of the frequency to use for the distance. It gives the Hertz or periods per unit of time; i.e., if the sampling is per minute, and each hour cycle is the period of interest |
a matrix with pairwise distances
For more details, check the astsa
package documentation on CRAN or visit
the GitHub repository https://github.com/nickpoison/astsa.
X=matrix( rnorm(2000), ncol=10 )
span1=2
span2=2
period=3
distance_matrix_coherence(unit=X, span1, span2, period )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.