"Linear dependence in the dictionary" sklearns OMP中的例外



我正在使用sklearns OrthogonalMatchingPursuit 使用KSVD算法学习的字典来获取信号的稀疏编码。但是,在适合期间,我收到以下运行时警告:

/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/omp.py:391: RuntimeWarning:  Orthogonal matching pursuit ended prematurely due to linear
dependence in the dictionary. The requested precision might not have been met.
  copy_X=copy_X, return_path=return_path)

在这些情况下,结果确实不能令人满意。我不明白这个警告的意义,因为在稀疏编码中,有一个过完整的字典是很常见的,因此其中也有线性依赖关系。这对OMP来说应该不是问题。事实上,如果字典是方阵,也会引发警告。

此警告是否也指向应用程序中的其他问题?

问题出在数据向量y

omp = OrthogonalMatchingPursuit(n_nonzero_coefs=target_sparsity)
omp.fit(D, y)

它包含的数量非常小。当我对y进行归一化以及D拟合以预期的准确性工作时。

最新更新