I\'m using sklearns OrthogonalMatchingPursuit to get a sparse coding of a signal using a dictionary learned by a KSVD algorithm. However, during the fit I get the following
The problem was in the data vector y in
y
omp = OrthogonalMatchingPursuit(n_nonzero_coefs=target_sparsity) omp.fit(D, y)
It contained numbers with very small magnitude. When I normalize y as well as D the fit works with the expected accuracy.
D