temporal_adjacency: Compute the temporal adjacency matrix of a time series

View source: R/temporal_weights.R

temporal_adjacencyR Documentation

Compute the temporal adjacency matrix of a time series

Description

This function computes the temporal adjacency matrix of a given time series using a specified weight mode, sigma, and window size.

Usage

temporal_adjacency(
  time,
  weight_mode = c("heat", "binary"),
  sigma = 1,
  window = 2
)

Arguments

time

A numeric vector representing a time series

weight_mode

Character, the mode for computing weights, either "heat" or "binary" (default is "heat")

sigma

Numeric, the sigma parameter for the heat kernel (default is 1)

window

Integer, the window size for computing adjacency (default is 2)

Value

A sparse symmetric matrix representing the computed temporal adjacency

Examples

# Create an example time series
time <- 1:10

# Compute the temporal adjacency matrix using the heat weight mode
result <- temporal_adjacency(time, weight_mode = "heat", sigma = 1, window = 2)


bbuchsbaum/graphweights documentation built on April 4, 2024, 7:19 p.m.