randsignal: Generate Random Signal with Varying Regularity

View source: R/randsignal.R

randsignalR Documentation

Generate Random Signal with Varying Regularity

Description

randsignal constructs a random signal with specific regularity properties, utilizing the adjacency matrix A of the graph, a smoothness parameter eta, and an exponent k.

Usage

randsignal(eta, k, A, r)

Arguments

eta

Numeric. Smoothness parameter (between 0 and 1).

k

Interger. Smoothness parameter.

A

Adjacency matrix. Must be symmetric.

r

Optional. Largest eigenvalue of A in magnitude (obtained using the eigs function from the RSpectra package is not provided).

Details

This method is inspired by the approach described in the first referenced paper.

The generated signal is formulated as f = A^k x_{\eta} / r^k where x_{\eta} represents Bernoulli random variables, and r is the largest eigenvalue of the matrix A.

The power k essentially captures the influence of a node's k-hop neighborhood in the generated signal, implying that a higher k would aggregate more neighborhood information resulting in a smoother signal.

The normalization by the largest eigenvalue ensures that the signal remains bounded. This signal generation can be related to the Laplacian quadratic form that quantifies the smoothness of signals on graphs. By controlling the parameters \eta and k, we can modulate the smoothness or regularity of the generated signal.

Value

f a numeric vector representing the output signal.

Note

The generation is carried out in sparse matrices format in order to scale up.

References

Behjat, H., Richter, U., Van De Ville, D., & Sörnmo, L. (2016). Signal-adapted tight frames on graphs. IEEE Transactions on Signal Processing, 64(22), 6017-6029.

de Loynes, B., Navarro, F., & Olivier, B. (2021). Data-driven thresholding in denoising with spectral graph wavelet transform. Journal of Computational and Applied Mathematics, 389, 113319.

Examples

## Not run: 
# Generate a signal with smoothness parameters eta = 0.7 and k = 3
f <- randsignal(eta = 0.7, k = 3, A = grid1$sA)

## End(Not run)

gasper documentation built on Oct. 27, 2023, 1:07 a.m.