tf.raw_ops.KmeansPlusPlusInitialization  |  TensorFlow v2.16.1 (original) (raw)

tf.raw_ops.KmeansPlusPlusInitialization

Stay organized with collections Save and categorize content based on your preferences.

Selects num_to_sample rows of input using the KMeans++ criterion.

View aliases

Compat aliases for migration

SeeMigration guide for more details.

tf.compat.v1.raw_ops.KmeansPlusPlusInitialization

tf.raw_ops.KmeansPlusPlusInitialization(
    points, num_to_sample, seed, num_retries_per_sample, name=None
)

Rows of points are assumed to be input points. One row is selected at random. Subsequent rows are sampled with probability proportional to the squared L2 distance from the nearest row selected thus far till num_to_sample rows have been sampled.

Args
points A Tensor of type float32. Matrix of shape (n, d). Rows are assumed to be input points.
num_to_sample A Tensor of type int64. Scalar. The number of rows to sample. This value must not be larger than n.
seed A Tensor of type int64. Scalar. Seed for initializing the random number generator.
num_retries_per_sample A Tensor of type int64. Scalar. For each row that is sampled, this parameter specifies the number of additional points to draw from the current distribution before selecting the best. If a negative value is specified, a heuristic is used to sample O(log(num_to_sample)) additional points.
name A name for the operation (optional).
Returns
A Tensor of type float32.

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. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.