The keras.wrappers.scikit_learn module can be used to build KerasClassifier model.

Can Keras be used to build clustering models?

If it can be, are there any examples for that?

  • $\begingroup$ Depends on what exactly you want, autoencoders are an example of that. What clustering algorithm do attempt to use? $\endgroup$ – Media May 9 '18 at 12:43
  • $\begingroup$ you know i want to use some features like age, city, education, company, job title and so on to cluster people into some groups and to get the key features of each group. $\endgroup$ – sanjie May 9 '18 at 13:08
  • $\begingroup$ Deep Learning tools generally suck at clustering. At best they include the slowest variant of k-means. One of the least useful methods. I doubt you find one that has, e.g., DBSCAN. Or even any of the fast k-means variants. Or OPTICS. Or support for other distance functions such as Canberra. $\endgroup$ – Has QUIT--Anony-Mousse May 9 '18 at 16:02

Yes, you can use Keras to build clustering algorithms. Recalling that Keras is a high-level api for Tensorflow or Theano, and that you can build a K-means algorithm (very well known clustering technique) in Tensorflow, you should be able to build it in Keras. Example (in tensorflow):https://learningtensorflow.com/lesson6/.

Nevertheless, sklearn has in-built clustering algorithms like K-means or Gaussian Mixture Models, so at first, I think a better approach is using these sklearn funcionalities.

  • 3
    $\begingroup$ There is no "KNN clustering". There is kNN classification and k-means clustering. That should tell you something about the reliability of that blog post. $\endgroup$ – Has QUIT--Anony-Mousse May 9 '18 at 15:59
  • $\begingroup$ Edited: following @Anony-Mousse $\endgroup$ – ignatius May 10 '18 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.