8000 [WIP] Make knn kernel undirected. by musically-ut · Pull Request #9439 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
wants to merge 2 commits into from

Conversation

musically-ut
Copy link
Contributor

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.

Fixes #8008.

@jnothman
Copy link
Member
jnothman commented Jul 23, 2017 via email

@musically-ut
Copy link
Contributor Author

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 S matrix than the one in the current version of the code. Perhaps I should try to implement that solution.

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.

@jnothman
Copy link
Member

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.
@musically-ut
Copy link
Contributor Author

Interesting option.

I see that it will preserve backwards compatibility but I am not sure whether the current knn kernel will map to any reference.

If we are planning on leaving the old knn in, then I'd rather do a proper fix following one of the references rather than a hack to make the kernel symmetric.

  • Decide on a name for the new kernel.

@cmarmo cmarmo added Needs Decision Requires decision and removed Waiting for Reviewer labels Dec 15, 2020
Base automatically changed from master to main January 22, 2021 10:49
@adrinjalali
Copy link
Member

@Micky774 @jjerphan what do you think of this?

@jjerphan
Copy link
Member
jjerphan commented Mar 6, 2024

Hence I would close it because:

  • There is not a strong need for this
  • This change is backward incompatible
  • Maintaining an option to have it is costly.

@adrinjalali adrinjalali closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] LabelPropagation should use undirected graphs for knn kernel.
6 participants
0