title: How to find the cluster in email
body: <p>I am doing a machine learning project and I have the dataset that contains the frequency of words that occurred in the email. I need to find the clusters that each mail belongs to. What I did is that I loaded a data into pandas dataframe, then I trained a KMeans algorithm. 
  The dataset looks like following:</p>
  
  <pre><code>[
      {
          "adwords": 2,
          "google": 4,
          "ads": 2,
          "facebook": 1,
          "shyam": 2
      },
      {
          "facebook": 4,
          "post": 2,
          "is": 1,
          "comment": 2,
          "likes": 1,
          "google": 1
      },...]
  </code></pre>
  
  <p>Then my python code looks like this:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  
  data = pd.read_json('data.json', orient='records')
  data = data.fillna(0)
  
  from sklearn.cluster import KMeans
  kmeans = KMeans(n_clusters=5, init='k-means++')
  kmeans.fit_predict(data)
  </code></pre>
  
  <p>Now since I have only 30 emails and I need to cluster them according to the words given, I cannot also split into train test set. Is this a right approach to solve the problem. Please suggest what algorithm would do best and what I should be doing. Thanks in advance</p>