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

Add predict function to DBSCAN clustering algorithm #259

Open
b-serra opened this issue Apr 22, 2024 · 3 comments
Open

Add predict function to DBSCAN clustering algorithm #259

b-serra opened this issue Apr 22, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@b-serra
Copy link

b-serra commented Apr 22, 2024

Is there any reason why DBSCAN module lacks of predict function compared to other clustering models contained here.

@krstopro
Copy link
Member

krstopro commented Apr 22, 2024

Hi @b-serra! I could be wrong, but I don't think DBSCAN can assign cluster labels to points other than those used for training the model. Looking at the scikit-learn implementation I see that it doesn't have predict as well.

@b-serra
Copy link
Author

b-serra commented Apr 22, 2024

Hi @krstopro! There is a fit_predict method in scikit-learn. Anyway I did not notice that scholar aims to map scikit-learn lib! My bad.

EDIT: Just checked that scikit-learn fit_predict method returns the result labels. Therefore as scholar implementation already returns labels values, there is no need for a predict or fit_predict funcion.

@krstopro
Copy link
Member

krstopro commented Apr 22, 2024

There is a fit_predict method in scikit-learn.

Perhaps we should add fit_predict here as well. I am not sure about it because fit_predict would just return the labels of the model fit on x.

Anyway I did not notice that scholar aims to map scikit-learn lib! My bad.

No worries - any suggestions are welcome!
There is a substantial difference between how the two actually work because Scholar is built on top of Nx. In case you are not familiar with it I suggest having a look at Introduction to Nx.

@josevalim josevalim changed the title predict function missing in DBSCAN clustering algorithm module Add predict function to DBSCAN clustering algorithm May 7, 2024
@josevalim josevalim added the help wanted Extra attention is needed label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants