View source: R/temporal_weights.R
temporal_adjacency | R Documentation |
This function computes the temporal adjacency matrix of a given time series using a specified weight mode, sigma, and window size.
temporal_adjacency(
time,
weight_mode = c("heat", "binary"),
sigma = 1,
window = 2
)
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) |
A sparse symmetric matrix representing the computed temporal adjacency
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.