View source: R/smoothmodulus.R
smoothmodulus | R Documentation |
smoothmodulus
computes the modulus of smoothness (or Laplacian quadratic form) for a graph signal.
smoothmodulus(f, A)
f |
Numeric vector representing the signal on the graph nodes |
A |
Adjacency matrix of the graph (matrix, can be either sparse or dense). |
smoothmodulus
provide a measure that quantifies the smoothness of a signal on a graph. In other words, it provides a measure of how much a signal varies between adjacent nodes. This measure is analogous to the Laplacian quadratic form, which is a widely used metric in spectral graph theory for quantifying signal smoothness.
The modulus of smoothness is calculated using:
\mu(f) = 0.5 \times \sum_{(i,j) \in E} A_{ij} (f_i - f_j)^2
where E
is the set of edges, A_{ij}
is the adjacency matrix entry for nodes i and j, and f_i
and f_j
are the signal values at nodes i and j respectively.
This metric essentially sums up the squared differences of signal values across adjacent nodes, weighted by the adjacency matrix. A high value indicates a more variable or irregular signal across the graph, while a lower value indicates a smoother signal.
A numeric scalar value indicating the modulus of smoothness for the graph signal.
randsignal
## Not run:
A <- grid1$sA
x <- grid1$xy[,1]
f <- sin(x)
smoothmodulus(f, A)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.