# tf.raw_ops.KmeansPlusPlusInitialization

<br />

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

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.KmeansPlusPlusInitialization`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/KmeansPlusPlusInitialization)

<br />

    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.

<br />

<br />

<br />

| ## 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). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `float32`. ||

<br />