Voronoi
The VoronoiStrata
class is imported using the following command:
>>> from UQpy.sampling.stratified_sampling.strata.VoronoiStrata import VoronoiStrata
Methods
- class VoronoiStrata(seeds=None, seeds_number=None, dimension=None, decomposition_iterations=1, random_state=None)[source]
Define a geometric decomposition of the n-dimensional unit hypercube into disjoint and space-filling Voronoi strata.
- Parameters:
seeds (
Optional
[ndarray
]) – An array of dimension \(N * n\) specifying the seeds of all strata. The seeds of the strata are the coordinates of the point inside each stratum that defines the stratum. The user must provide seeds or seeds_number and dimensionseeds_number (
Optional
[int
]) – The number of seeds to randomly generate. Seeds are generated by random sampling on the unit hypercube. The user must provide seeds or seeds_number and dimensiondimension (
Optional
[int
]) – The dimension of the unit hypercube in which to generate random seeds. Used only if seeds_number is provided. The user must provide seeds or seeds_number and dimensiondecomposition_iterations (
int
) – Number of iterations to perform to create a Centroidal Voronoi decomposition. Ifdecomposition_iterations = 0
, the Voronoi decomposition is based on the provided or generated seeds. Ifdecomposition_iterations >= 1
, the seed points are moved to the centroids of the Voronoi cells in each iteration and a new Voronoi decomposition is performed. This process is repeated decomposition_iterations times to create a Centroidal Voronoi decomposition.
Attributes
-
VoronoiStrata.voronoi:
Voronoi
Defines a Voronoi decomposition of the set of reflected points. When creating the Voronoi decomposition on the unit hypercube, the code reflects the points on the unit hypercube across all faces of the unit hypercube. This causes the Voronoi decomposition to create edges along the faces of the hypercube.
This object is not the Voronoi decomposition of the unit hypercube. It is the Voronoi decomposition of all points and their reflections from which the unit hypercube is extracted.
To access the vertices in the unit hypercube, see the attribute
vertices
.