Skip to content

[WIP] update impostors #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

wdevazelhes
Copy link
Member

@wdevazelhes wdevazelhes commented Jun 21, 2019

See #208 (comment)

This fixes the TODO at top of LMNN: it recomputes the impostors at each step

This is a WIP and not tested for now (though it works on a small example but it's not efficient at all, more like a first atempt to do that with very few code change)

Note that in the scikit-learn PR, they do update the impostors scikit-learn/scikit-learn#8602, but they only keep a maximum number of impostors

We also need to decide whether we want impostors updating to be an option or to be always there

Note: for now, I update the impostors, but it's not at all efficient, because the distances comparisons are re-done just after, when computing the active constraints. The advantage of computing impostors is to search for active constraints only amongst them. An idea could be to do the following (I've not thought of it all the way through so it might be wrong):

  • for the furthest target neighbors: we compute the impostors (by comparing among all/[a max number of impostors] distances between different labels points and target neighbors)
  • amongst those only, we compute the impostors wrt the second furthest neighbor (because if a pair is not an impostor wrt to the furthest target neighbor, it's not either for the second further)
    etc

Note: a quick solution that could be used as a first improvement (and the real improvement would be in V0.6.0) would be to have an option to either use the impostors computed at the beginning, or to use all impostors possible (i.e. all pairs of points of different labels) (which can very easily be implemented in the find_impostors function

@bellet
Copy link
Member

bellet commented Jul 3, 2019

Closing for now as we will go for #228 which is closer to current implementation
We can pick this up later when dealing with #210

@bellet bellet closed this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants