title: What is the use of predict() method in kmeans implementation of scikit learn?
body: <p>Can someone explain what is the use of <code>predict()</code> method in kmeans implementation of scikit learn? The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans.predict" rel="nofollow noreferrer">official documentation</a> states its use as:</p>
  
  <blockquote>
    <p>Predict the closest cluster each sample in X belongs to.</p>
  </blockquote>
  
  <p>But I can get the cluster number/label for each sample of input set X by training the model on <code>fit_transform()</code> method also. So what is the use of <code>predict()</code> method? Is it supposed to point out closest cluster for the unseen data? If yes, then how do you handle a new data point if you perform dimensionality reduction measure such as SVD?</p>
  
  <p>Here's a <a href="https://stackoverflow.com/questions/25012342/scikit-learns-k-means-what-does-the-predict-method-really-do">similar question</a> but I still don't think it really helps.</p>