temporal_laplacian: Compute the temporal Laplacian matrix of a time series

View source: R/temporal_weights.R

temporal_laplacianR Documentation

Compute the temporal Laplacian matrix of a time series

Description

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

Usage

temporal_laplacian(
  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 Laplacian

Examples

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

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


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