Predictor belongs to the cluster

elena2020chao
elena2020chao New Altair Community Member
edited November 5 in Community Q&A

Hello
How after clustering kmeans on texts
Identify, in which cluster is the new entered text?
How do I predict which cluster is the new text?
Thankful
And how after text clustering with kmeans, a picture like the following is plotted?
What is the word cluster center?

۲.JPG

Answers

  • kypexin
    kypexin New Altair Community Member

    Hi @elena2020chao

     

    For your first question: 

     

    Not sure why you explicitly need to predict a cluster.  

     

    Clustering algorithm adds cluster labels to the data, then it is possible to built for example a decision tree model over these labels, this way you can predict a cluster label for the new text. 

     

    But also consider the simplest and most straightforward way (especially if you don't have many texts), in which you just add a new text to your corpus and then run clustering algorithm over it once again, this way new text will be assigned to one of the clusters.