Skip to content

Passing K-NN metric to SpectralClustering #8611

@jachymb

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.

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