I have a user dataset which contains fields like ['age','gender', 'computer_literacy', 'vision', 'colour_blind', 'education', 'font_size','colour'].

I clustered this data and assigned the new cluster to the existing data. Now I want to know: how can I find a similar cluster for a new user?

As an example, if I am a new user I may submit only a few details like ['age', 'gender', 'computer_literacy', 'vision'] but still want to know to which cluster I belong.

What are the possible approaches to solve this problem?


Suppose if you use kmeans clustering then you can

1.train and save the model using pickle

2.loa the model using pickle

3.pass your new sample as a vector to the predict function of the loaded model object model.predict([[0, 0], [12, 3]])

this will give you only one cluster label

4.if you want to get top n clusters that the sample might belong to then take the cluster centers of your model as save it in a variable this will be list of list or matrix .


compute the similarity between your new sample and the cc matrix , rank the distances and yo will get n nearest clusters

  • $\begingroup$ This doesn't answer the part about having incomplete features $\endgroup$ Jan 7 at 18:59
  • $\begingroup$ Can be add default data for incomplete one and cluster? Isn't is lead to a wrong clustering? $\endgroup$ Jan 9 at 13:03

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.