Learn R Programming

gasper (version 1.1.6)

smoothmodulus: Modulus of Smoothness for Graph Signal

Description

smoothmodulus computes the modulus of smoothness (or Laplacian quadratic form) for a graph signal.

Usage

smoothmodulus(f, A)

Value

A numeric scalar value indicating the modulus of smoothness for the graph signal.

Arguments

f

Numeric vector representing the signal on the graph nodes

A

Adjacency matrix of the graph (matrix, can be either sparse or dense).

Details

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.

See Also

randsignal

Examples

Run this code
if (FALSE) {
A <- grid1$sA
x <- grid1$xy[,1]
f <- sin(x)
smoothmodulus(f, A)
}

Run the code above in your browser using DataLab