title: PySpark 2: KMeans The input data is not directly cached
body: <p>I don't know why I receive the message </p>
  
  <pre class="lang-none prettyprint-override"><code>WARN KMeans: The input data is not directly cached, which may hurt performance if its parent RDDs are also uncached.
  </code></pre>
  
  <p>When I try to use Spark <code>KMeans</code></p>
  
  <pre><code>df_Part = assembler.transform(df_Part)    
  df_Part.cache()
  while (k&lt;=max_cluster) and (wssse &gt; seuilStop):
                      kmeans = KMeans().setK(k)
                      model = kmeans.fit(df_Part)
                      wssse = model.computeCost(df_Part)
                      k=k+1
  </code></pre>
  
  <p>It says that my input (Dataframe) is not cached !!</p>
  
  <p>I tried to print df_Part.is_cached and I received True which means that my dataframe is cached, So why Spark still warns me about this?</p>