{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _qmc / _lloyd_iteration

function

scipy.stats._qmc:_lloyd_iteration

source: /scipy/stats/_qmc.py :2683

Signature

def   _lloyd_iteration ( sample : np.ndarray decay : float qhull_options : str )  →  np.ndarray

Summary

Lloyd-Max algorithm iteration.

Extended Summary

Based on the implementation of Stéfan van der Walt:

https://github.com/stefanv/lloyd

which is:

Copyright (c) 2021-04-21 Stéfan van der Walt https://github.com/stefanv/lloyd MIT License

Parameters

sample : array_like (n, d)

The sample to iterate on.

decay : float

Relaxation decay. A positive value would move the samples toward their centroid, and negative value would move them away. 1 would move the samples to their centroid.

qhull_options : str

Additional options to pass to Qhull. See Qhull manual for details. (Default: "Qbb Qc Qz Qj Qx" for ndim > 4 and "Qbb Qc Qz Qj" otherwise.)

Returns

sample : array_like (n, d)

The sample after an iteration of Lloyd's algorithm.

Aliases

  • scipy.stats._qmc._lloyd_iteration