Sparsifying Dictionaries and Sensing Matrices

Functions for constructing sparsying dictionaries and sensing matrices

gaussian_mtx(key, N, D[, normalize_atoms])

A dictionary/sensing matrix where entries are drawn independently from normal distribution.

rademacher_mtx(key, M, N[, normalize_atoms])

A dictionary/sensing matrix where entries are drawn independently from Rademacher distribution.

sparse_binary_mtx(key, M, N, d[, …])

A sensing matrix where exactly d entries are 1 in each column

random_onb(key, N)

Generates a random orthonormal basis for \(\mathbb{R}^N\)

random_orthonormal_rows(key, M, N)

Generates a random sensing matrix with orthonormal rows

hadamard(n[, dtype])

Hadamard matrices of size \(n imes n\)

hadamard_basis(n)

A Hadamard basis

dirac_hadamard_basis(n)

A dictionary consisting of identity basis and hadamard bases

cosine_basis(N)

DCT Basis

dirac_cosine_basis(n)

A dictionary consisting of identity and DCT bases

dirac_hadamard_cosine_basis(n)

A dictionary consisting of identity, Hadamard and DCT bases

fourier_basis(n)

Fourier basis

wavelet_basis(n, name[, level])

Builds a wavelet basis for a given decomposition level

Dictionary properties

gram(A)

Computes the Gram matrix \(G = A^T A\)

frame(A)

Computes the frame matrix \(G = A A^T\)

coherence_with_index(A)

Returns the coherence of a dictionary A along with indices of most correlated atoms

coherence(A)

Computes the coherence of a dictionary

frame_bounds(A)

Computes the frame bounds (largest and smallest singular valuee)

upper_frame_bound(A)

Computes the upper frame bound for a dictionary

lower_frame_bound(A)

Computes the lower frame bound for a dictionary

babel(A)

Computes the babel function for a dictionary (generalized coherence)

Dictionary comparison

These functions are useful for comparing dictionaries during the dictionary learning process.

mutual_coherence_with_index(A, B)

Mutual coherence between two dictionaries A and B along with indices of most correlated atoms

mutual_coherence(A, B)

“Mutual coherence between two dictionaries A and B

matching_atoms_ratio(A, B[, distance_threshold])

Identifies how many atoms are very close between dictionaries A and B

Grassmannian frames

minimum_coherence(m, n)

Minimum achievable coherence for a Grassmannian frame

build_grassmannian_frame(init[, frac, …])

Builds a Grassmannian frame starting from a random matrix