KMeans ====== .. currentmodule:: sklearn.cluster .. autoclass:: KMeans :members: :inherited-members: :special-members: __call__ .. minigallery:: sklearn.cluster.KMeans sklearn.cluster.KMeans.__init__ sklearn.cluster.KMeans.fit sklearn.cluster.KMeans.fit_predict sklearn.cluster.KMeans.fit_transform sklearn.cluster.KMeans.get_feature_names_out sklearn.cluster.KMeans.get_metadata_routing sklearn.cluster.KMeans.get_params sklearn.cluster.KMeans.predict sklearn.cluster.KMeans.score sklearn.cluster.KMeans.set_fit_request sklearn.cluster.KMeans.set_output sklearn.cluster.KMeans.set_params sklearn.cluster.KMeans.set_score_request sklearn.cluster.KMeans.transform :add-heading: Gallery examples :heading-level: -