pyDML icon indicating copy to clipboard operation
pyDML copied to clipboard

Constructor arguments don't seem to be passing on to the algorithm

Open aadharna opened this issue 3 years ago • 1 comments

I noticed that even when parameters are explicitly filled in in some of the dml constructors (e.g. NCA, LMNN), when I try to look at those values, I keep getting that the values are set to None and not the default values according to the documentation.

image


image

My first thought was that since many of the arguments shadowed your default arguments, that could be why they didn't show up, but the Nones persisted even when I changed those parameters. (But then I remembered that that makes no sense, so that couldn't be the issue.)


Also, side question: I know that algorithms of a nearest-neighbor variety are inherently expensive even when you're using the Euclidean R^N metric and not also trying to learn a metric, but when I tried to fit LMNN on a dataset of size: 6460 x 143 feels like it shouldn't be taking upwards of 10 hours. Is this extremely long runtime normal?


Finally, I just wanted to say that the survey paper that led me to your repo was wonderfully written.

Cheers, Aaron

aadharna avatar Jul 09 '20 02:07 aadharna

Hi, thank you for your kind words and for pointing out this issue. There is indeed a problem with the arguments being showed in the algorithms. It is due to an incorrect naming of the variables in the constructors, with respect to what is specified in the Scikit-Learn API and I will fix it as soon as possible. However, the algorithms are handling the variables with the correct values specified through the constructor, so this problem does not affect the operation of the algorithms.

According to the expensiveness of the DML algorithms, some of the implementations, like the LMNN one, currently take a lot of time. This is something I've wanted to review for a long time, but until at least August I'm going to be too busy to get on with it. Perharps I will open a new issue to deal with this.

Cheers, Juan Luis.

jlsuarezdiaz avatar Jul 09 '20 12:07 jlsuarezdiaz