Skip to content

Passing K-NN metric to SpectralClustering #8611

Closed

Description

@jachymb

I wanted to do SpectralClustering with affinity given by nearest-neighbors but use manhattan metric for the nearest-neighbor task. (i.e. the argument metric in KNeighborsClassifier). But it's not clear from the documentation how to do this. It is possible to pass n_neighbors to SpectralClustering but not the metric. Then there is also the kernel_params argument but the documentation says "Parameters (keyword arguments) and values for kernel passed as callable object. Ignored by other kernels." So I would think passing kernel_params={"metric":"manhattan"} has no effect. If it does, the documentation should be corrected. If it does not, I think it should be supported in some way.

Activity

  1. jnothman commented on Mar 19, 2017

    @jnothman
    Member
  2. pranaydeeps commented on Mar 23, 2017

    @pranaydeeps

    I would like to work on this if no one else is? @jnothman

  3. TomDLT commented on Sep 18, 2019

    @TomDLT
    Member

    It is now possible to give a neighbors graph to spectral clustering (see #10482)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions