distance_matrix_PDC: Distance matrix from a partial directed coherence measure...

View source: R/Distance_matrix_knn_algorithm.R

distance_matrix_PDCR Documentation

Distance matrix from a partial directed coherence measure (PDC)

Description

Pairwise distance matrix of a multivariate time series based on the partial directed coherence among two series. The distance considers both directions of causality and transform it to give 0 in absence of causality between the series.

Usage

distance_matrix_PDC(unit, ar, period)

Arguments

unit

A matrix representing a multivariate time series where each column is a univariate time series.

ar

Integer vector containing all the lags considered for the vector autoregressive model

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

Value

a matrix with pairwise distances

See Also

Guillermo Granados, and Idris Eckley. "Electricity Demand of Buildings Benchmarked via Regression Trees on Nearest Neighbors Anomaly Scores"

Examples

X=matrix( rnorm(2000), ncol=10  )
ar=c(1, 2)
period=10
distance_matrix_PDC(  unit=X, ar,  period )

AnomalyScore documentation built on April 4, 2025, 3:13 a.m.