[scikit-learn] OMP ended prematurely due to linear dependence in the dictionary

Benjamin Merkt benjamin.merkt at bcf.uni-freiburg.de
Tue Feb 14 05:00:52 EST 2017


Hi,

I tried that with no effect. The fit still breaks after two iterations.

If I set precompute=True I get three coefficients instead of only two. 
My Dictionary is fairly large (currently 128x42000). Is it even feasible 
to use OMP with such a big Matrix (even with ~120GB ram)?

-Ben



On 13.02.2017 23:31, Vlad Niculae wrote:
> Hi,
>
> Are the columns of your matrix normalized? Try setting `normalized=True`.
>
> Yours,
> Vlad
>
> On Mon, Feb 13, 2017 at 6:55 PM, Benjamin Merkt
> <benjamin.merkt at bcf.uni-freiburg.de> wrote:
>> Hi everyone,
>>
>> I'm using OrthogonalMatchingPursuit to get a sparse coding of a signal using
>> a dictionary learned by a KSVD algorithm (pyksvd). However, during the fit I
>> get the following RuntimeWarning:
>>
>> /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)
>>
>> In those cases the results are indeed not satisfactory. I don't get the
>> point of this warning as it is common in sparse coding to have an
>> overcomplete dictionary an thus also linear dependency within it. That
>> should not be an issue for OMP. In fact, the warning is also raised if the
>> dictionary is a square matrix.
>>
>> Might this Warning also point to other issues in the application?
>>
>>
>> Thanks, Ben
>>
>> _______________________________________________
>> scikit-learn mailing list
>> scikit-learn at python.org
>> https://mail.python.org/mailman/listinfo/scikit-learn
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>


More information about the scikit-learn mailing list