Features

The pygsp.features module implements different feature extraction techniques based on pygsp.graphs and pygsp.filters.

pygsp.features.compute_avg_adj_deg(G)[source]

Compute the average adjacency degree for each node.

The average adjacency degree is the average of the degrees of a node and its neighbors.

Parameters:

G: Graph

Graph on which the statistic is extracted

pygsp.features.compute_norm_tig(g, **kwargs)[source]

Compute the \(\ell_2\) norm of the Tig. See compute_tig().

Parameters:

g: Filter

The filter or filter bank.

kwargs: dict

Additional parameters to be passed to the pygsp.filters.Filter.filter() method.

pygsp.features.compute_spectrogram(G, atom=None, M=100, **kwargs)[source]

Compute the norm of the Tig for all nodes with a kernel shifted along the spectral axis.

Parameters:

G : Graph

Graph on which to compute the spectrogram.

atom : func

Kernel to use in the spectrogram (default = exp(-M*(x/lmax)²)).

M : int (optional)

Number of samples on the spectral scale. (default = 100)

kwargs: dict

Additional parameters to be passed to the pygsp.filters.Filter.filter() method.

pygsp.features.compute_tig(g, **kwargs)[source]

Compute the Tig for a given filter or filter bank.

\[T_ig(n) = g(L)_{i, n}\]
Parameters:

g: Filter

One of pygsp.filters.

kwargs: dict

Additional parameters to be passed to the pygsp.filters.Filter.filter() method.