localize_gft: Localize Kernel at a Graph Vertex Using GFT

View source: R/localize_gft.R

localize_gftR Documentation

Localize Kernel at a Graph Vertex Using GFT

Description

This function localizes a kernel at a specific vertex using the Graph Fourier Transform (GFT).

Usage

localize_gft(i, L, evectors = NULL)

Arguments

i

Integer index of the node where to localize the kernel.

L

Laplacian matrix of the graph.

evectors

Numeric matrix of the eigenvectors of the Laplacian matrix. If NULL (default), the function will compute the eigendecomposition of the Laplacian.

Details

The GFT represents the signal in the graph's frequency domain through the eigendecomposition of the Laplacian matrix.

The kernel is localized by transforming an impulse signal centered at vertex i using the GFT. The impulse for vertex i is represented by a vector s with all zeros except for a single one at the i-th position. The GFT of a signal s is given by:

\hat{s} = U^T s

where U is the matrix of eigenvectors of the Laplacian.

Applying the GFT to the impulse signal provides a spatial representation of the eigenvector (or kernel) associated with a specific frequency (eigenvalue) centered around vertex i. This depicts how the kernel influences the local neighborhood of the vertex.

Value

s Kernel localized at vertex i using GFT.

See Also

forward_gft,localize_sgwt

Examples

## Not run: 
L <- laplacian_mat(grid1$sA)
vertex_i <- sample(1:nrow(L), 1)
s <- localize_gft(vertex_i, L=L)
plot_signal(grid1, s)
s_gft <- forward_gft(L, s)
barplot(abs(s_gft), main="GFT of Localized Signal",
        xlab="Eigenvalue Index", ylab="Magnitude")

## End(Not run)

gasper documentation built on May 29, 2024, 8:32 a.m.