Add predict function to DBSCAN clustering algorithm
Is there any reason why DBSCAN module lacks of predict function compared to other clustering models contained here.
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.
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.
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.