title: How to combine K-means clustering with Naive Bayes
body: <p>Recently,I read some paper about K-means and Naive Bayes learning approach.But I am confused about how to combine these two methods together.</p>
  
  <p>For example, X(x1,x2,x3,...,xn) denotes data record.Label denotes the class which data record Xi belongs to.Assume there are two classes denoted as K1 and K2.
  So, we always have Xi (i∈[1,n]) belongs to {K1,K2}</p>
  
  <p>As is known to all, K-means method can cluster data record X.Suppose K=2.Then we have Clx(Clx(i)∈{1,2}, i∈[1，n]) denote the clustering result.</p>
  
  <p>Naive Bayes can calculate the probability. if P(K1|X)>P(K2|X)} then sample X can be classified to class K1. Otherwise X can be classified to class K2.</p>
  
  <p>We can calculate probability using Bayes' theorem.</p>
  
  <p>P(K1|X)=P(X|K1)P(K1)/P(X)=P(x1|K1)P(x2|K1)...P(xn|K1)/P(X)</p>
  
  <p>But How can I combine K-means with Naive Bayes?</p>
  
  <p>So, I think I can use XX denotes (X,Clx).And then use XX to train Naive Bayes Classifier like nb=NaiveBayes.fit(XX,Label,'Distribution', 'normal').</p>
  
  <p>Then I test the classifier I trained before, the result is so depressing.</p>
  
  <p>Am I wrong? </p>
  
  <p>Is this the way to combine these two methods?</p>