Hey Fernando,

By setting use_pca=True, I still get the same error.  However, setting it
to False , the program runs. (though very slowly)
If i run the LMNN example from
http://all-umass.github.io/metric-learn/metric_learn.lmnn.html , it runs
fine without even setting the use_pca parameter.

Would you have any advice on how to circumvent this problem?

PS: my dataset shape is 500 x 6000.

Regards,
Deepak

On Tue, Apr 12, 2016 at 2:38 PM, Fernando J. Iglesias García <
[email protected]> wrote:

> Hi Deepak,
>
> Then, there might be a problem (i.e. wrong dimension) with the matrix
> passed to initalise LMNN. I suggest you to try setting use_pca to True.
> That will make Shogun's LMNN to start using a matrix obtained by applying
> PCA.
>
> Modifying line 55 in your gist to
>
> lmnn = LMNN(k=3, learn_rate=1e-3, use_pca=True)
>
> should do it.
>
> Let me know how it goes.
>
> Cheers,
> Fernando.
>
> On 12 April 2016 at 18:52, Deepak Rishi <[email protected]> wrote:
>
>> Hi Fernando,
>>
>> The gist is at
>> https://gist.github.com/deerishi/e4ea6257e88ea924cc0fb091a5af1670 .
>>
>> I did not use the parameter use_pca. Nor did I call the PCA function.
>>
>> @Chintak , have you used LMNN before?
>>
>>
>> Regards,
>> Deepak
>>
>> On Tue, Apr 12, 2016 at 4:33 AM, Fernando J. Iglesias García <
>> [email protected]> wrote:
>>
>>> Dear Deepak,
>>>
>>> Can you share in a gist, pastebin, or the like, a snippet with your
>>> relevant code? Particularly at this moment I am interested to know whether
>>> you are using the parameter use_pca.
>>>
>>> Cheers,
>>> Fernando.
>>>
>>> On 12 April 2016 at 08:39, Deepak Rishi <[email protected]> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I am using the python package metric_learn
>>>> http://all-umass.github.io/metric-learn/metric_learn.lmnn.html for
>>>> Large Margin Nearest Neighbour. It uses LMNN from Shogun if it is
>>>> installed. Since Shogun has a faster implementation for LMNN I decied to
>>>> use it.
>>>>
>>>> When I run my code for LMNN in python I get the error "SystemError:
>>>> [ERROR] In file /home/drishi/shogun-4.1.0/src/shogun/preprocessor/PCA.cpp
>>>> line 102: target dimension should be less or equal to than minimum of N and
>>>> D
>>>> "
>>>>
>>>> Any advice on why is this error occurring ?
>>>>
>>>>
>>>> Regards,
>>>> Deepak
>>>>
>>>
>>>
>>
>

Reply via email to