-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[WIP] Make knn kernel undirected. #9439
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
do we have reference to guide this change? (sorry if they're listed in the
issue)
…On 24 Jul 2017 3:28 am, "Utkarsh Upadhyay" ***@***.***> wrote:
This is a very simple way of making the knn kernel matrix symmetric.
However, this slightly changes the meaning of n_neighbors: the *actual*
number of neighbors may vary from n_neighbors to 2 * n_neighbors in the
worst case.
- Update tests after #5893
<#5893> is merged.
Fixes #8008 <#8008>.
------------------------------
You can view, comment on, or merge this pull request online at:
#9439
Commit Summary
- Make knn kernel undirected.
File Changes
- *M* sklearn/semi_supervised/label_propagation.py
<https://github.com/scikit-learn/scikit-learn/pull/9439/files#diff-0>
(13)
- *M* sklearn/semi_supervised/tests/test_label_propagation.py
<https://github.com/scikit-learn/scikit-learn/pull/9439/files#diff-1>
(40)
Patch Links:
- https://github.com/scikit-learn/scikit-learn/pull/9439.patch
- https://github.com/scikit-learn/scikit-learn/pull/9439.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9439>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAEz64rv6gXp9bvPcQNKetvMyKrQW-Uhks5sQ4K5gaJpZM4Ogg-1>
.
|
There is some discussion of directed graphs in Section 6.6 of Semi-Supervised Learning Literature Survey. This paper explicitly deals with the problem, but using a different On a cursory look, I couldn't find any explicit discussion about using kNN to build the underlying graphs in the two references mentioned for the present code; they only seem to use k-NN as baselines. |
Would it be sensible to name this kernel by a different string and leave the theoretically dubious one there? |
Also, fix/update the tests. Fixes scikit-learn#8008.
3d4c1f3
to
d99d853
Compare
Interesting option. I see that it will preserve backwards compatibility but I am not sure whether the current If we are planning on leaving the old
|
Hence I would close it because:
|
This is a very simple way of making the
knn
kernel matrix symmetric. However, this slightly changes the meaning ofn_neighbors
: the actual number of neighbors may vary fromn_neighbors
to2 * n_neighbors
in the worst case.Fixes #8008.