# 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$$ A Hadamard basis A dictionary consisting of identity basis and hadamard bases DCT Basis A dictionary consisting of identity and DCT bases A dictionary consisting of identity, Hadamard and DCT bases Fourier basis wavelet_basis(n, name[, level]) Builds a wavelet basis for a given decomposition level

## Dictionary properties¶

 Computes the Gram matrix $$G = A^T A$$ Computes the frame matrix $$G = A A^T$$ Returns the coherence of a dictionary A along with indices of most correlated atoms Computes the coherence of a dictionary Computes the frame bounds (largest and smallest singular valuee) Computes the upper frame bound for a dictionary Computes the lower frame bound for a dictionary 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 between two dictionaries A and B along with indices of most correlated atoms “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 achievable coherence for a Grassmannian frame build_grassmannian_frame(init[, frac, …]) Builds a Grassmannian frame starting from a random matrix