epfl-lts2 / pygsp

Graph Signal Processing in Python
https://pygsp.rtfd.io
BSD 3-Clause "New" or "Revised" License
483 stars 93 forks source link

much improved NN graph #43

Open mdeff opened 5 years ago

mdeff commented 5 years ago

Contains PR #21 with some improvements.

Major fixes:

Major improvements:

Ohers:

mdeff commented 5 years ago

@nperraud, can you take a look?

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.8%) to 88.508% when pulling 3212350649d51721534e13ccec3d58c9a8cee029 on naspert-nn_refactor into 49ff67918d7d7b723cfa58d1bee017809627bd6b on master.

mdeff commented 5 years ago

Thanks for the review @nperraud. I'll address it soon.

While we're at it, I'm thinking about integrating knn and radius graphs. I'd remove the kind parameter, and rename k to max_neighbors and radius to max_distance. Then:

nperraud commented 5 years ago

Another problem that I see is that the installation of the library for approximate nn is not well documented...

nperraud commented 5 years ago

I have just added the function I coded to this branch to get the nearest neighbor search out of the Knn graph. The Knn graph function still needs to be modified.

mdeff commented 5 years ago

Thanks! Can you fix the tests?

nperraud commented 5 years ago

I tried, but failed. They work on my machine but the seed is different. I have to think about how to do it... Maybe you can help me. Let us discuss later...

nperraud commented 5 years ago

Tests are passing... The coverage is reduced (probably less raise Error check...) but I think it will increase again once the functions in _nearest_neighboors are cleaned. I wil do that before my vacation...

Currently the code is not very clean...

nperraud commented 5 years ago

Ok Should be ready for the merge...

nperraud commented 5 years ago

@mdeff Everything is done. For me, it can be merged to master.

gcuendet commented 4 years ago

Very nice to see more efficient knn search implementations for knn graph building! Is there anything still missing before merging the PR? Do you have a rough idea of when this will be merged? Thanks for all the hard work on this very useful python package!

mdeff commented 4 years ago

Thanks for the kind words @gcuendet. I mostly need to address review comments. I would also like to merge knn and radius graphs. I'll probably get to this in the not too far future as two other PRs (#55 and #57) depend on it. Then I'll make a new release.

mdeff commented 3 years ago
nperraud commented 3 years ago

I suggest the following:

mdeff commented 3 years ago
nperraud commented 3 years ago

Seeing all your proposition, I believe scale is the best option. It is rescaling or renormalisation, but I would prefer not to use something like norm because it is confusing.