Module cluster (0.22.0)

Clustering models. This module is styled after Scikit-Learn's cluster module: https://scikit-learn.org/stable/modules/clustering.html.

Classes

KMeans

KMeans(n_clusters: int = 8)

K-Means clustering.

Parameter
Name Description
n_clusters int, default 8

The number of clusters to form as well as the number of centroids to generate. Default to 8.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月27日 UTC.