Hi,
If you want to predict the Kmeans cluster membership, you can use Kmeans' 
predict method instead of training a KNN model on the cluster assignments. This 
will be computationally more efficient and give you the correct assignment at 
the borders between clusters.

Best,
Sebastian

> On Mar 12, 2018, at 2:55 AM, prince gosavi <princegosav...@gmail.com> wrote:
> 
> Hi,
> I have generated clusters using the KMeans algorithm and would like to use 
> the labels of the model in the KNN.
> 
> I don't have the implementation idea but I can visualize it as
> 
> KNNmodel = KNN.fit(X, KMeansModel.labels_)
> 
> Such that the KNN will predict the cluster the new point belong to.
> 
> -- 
> Regards
> _______________________________________________
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to