After segmenting customer base using k means algorithm into 5 clusters , how to assign a new customer to one of the existing 5 clusters?

Matching just the mean of clusters with values of new customer and assigning to the most matching cluster seems too naive.

Is the best solution to built a classification model with each of the cluster ids as target and assigning new customers based on cluster with highest probability?

  • 1
    $\begingroup$ Since you used k-means you already assumed that each component of the customer information is equally important. So you can either continue like that, i.e. match the new customer with euclidean distance to cluster centers, or think of what the gain/loss of misclassification will be? $\endgroup$ Feb 16, 2015 at 14:26
  • $\begingroup$ Thanks. Calculate Euclidean distance of new customer to centroid of each cluster and assigning to cluster with least distance. Is this better approach than building a classification model which gives probability of being in each of the clusters? $\endgroup$ Feb 16, 2015 at 15:08

1 Answer 1


It depends on your goal:

  • Choose the cluster assignment based on squared Euclidean distance to the cluster centroids to have a consistent approach. That means if you believe in your assumptions of your clustering approach (K means in your case): equal weight for each variable, squared Euclidean distance as metric for the similarity,.. then you should stick with that assumption and go ahead with it.
  • Build a classifier based on the assigned clusters and then have the classifier decide if you accept the difference in assumption between the classifier and the clustering approach. The main benefit of this approach is you can make the clustering explicit if your classification model is understandable. E.g. you may choose a decision tree classifier (accepting the different assumptions - some variables might be irrelevant or less important - the decision boundaries are parallel to the axes,.. - but you have made the clusters/classes explicit when you look at the tree.

A third consideration is how many new customers do you plan to assign? When the number increases you will have to decide at one point to rerun the clustering (and in option b) the classifier if you observe a concept drift.

To assess the latter situation you might want to look at the excellent work from Pedro Domingos, et al. e.g. http://www2.denizyuret.com/ref/domingos/www.cs.washington.edu/homes/pedrod/papers/mlc01.pdf


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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