Skip to content
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

Can I retrieve points within each cluster from spherical k-means clustering? #3333

Open
2 of 4 tasks
KimMinSang96 opened this issue Mar 29, 2024 · 1 comment
Open
2 of 4 tasks

Comments

@KimMinSang96
Copy link

KimMinSang96 commented Mar 29, 2024

Platform

OS: ubuntu 22.04

Faiss version:

Installed from: source

Faiss compilation options:

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python

I'm considering using spherical k-means clustering for my project. I'm curious if there's a way to obtain a list, preferably in a 2D format, that contains all points within each cluster. For instance, assuming a k value of 2 and my vectors are (1, 1), (1, 2), (1, 3), (-1, -2), and (-3, -4), I'm looking for a method that returns the points in clusters similar to the following structure:

Centroid point a: [(1, 1), (1, 2), (1, 3)]
Centroid point b: [(-1, -2), (-3, -4)]
Is there a straightforward way to achieve this? Any guidance or suggestions would be greatly appreciated.

@mdouze
Copy link
Contributor

mdouze commented Apr 5, 2024

you can use kmeans.assign(points)

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

No branches or pull requests

2 participants