direct_sampling {volesti} | R Documentation |
Sample perfect uniformly distributed points from well known convex bodies: (a) the unit simplex, (b) the canonical simplex, (c) the boundary of a hypersphere or (d) the interior of a hypersphere.
Description
The -dimensional unit simplex is the set of points
, s.t.:
,
. The
-dimensional canonical simplex is the set of points
, s.t.:
,
.
Usage
direct_sampling(body, n)
Arguments
body |
A list to request exact uniform sampling from special well known convex bodies through the following input parameters:
|
n |
The number of points that the function is going to sample. |
Value
A matrix that contains, column-wise, the sampled points from the convex polytope P.
References
R.Y. Rubinstein and B. Melamed, “Modern simulation and modeling” Wiley Series in Probability and Statistics, 1998.
A Smith, Noah and W Tromble, Roy, “Sampling Uniformly from the Unit Simplex,” Center for Language and Speech Processing Johns Hopkins University, 2004.
Examples
# 100 uniform points from the 2-d unit ball
points = direct_sampling(n = 100, body = list("type" = "ball", "dimension" = 2))