bundles / scipy 1.17.1 / scipy / cluster / vq / _kpp
function
scipy.cluster.vq:_kpp
source: /scipy/cluster/vq.py :577
Signature
def _kpp ( data , k , rng , xp ) Summary
Picks k points in the data based on the kmeans++ method.
Parameters
data: ndarrayExpect a rank 1 or 2 array. Rank 1 is assumed to describe 1-D data, rank 2 multidimensional data, in which case one row is one observation.
k: intNumber of samples to generate.
rng: `numpy.random.Generator` or `numpy.random.RandomState`Random number generator.
Returns
init: ndarrayA 'k' by 'N' containing the initial centroids.
Aliases
-
scipy.cluster.vq._kpp