The randomstart command#

Note

This is a CLI reference, you can view Python API reference here. For an in-depth tutorial using Python API, see Visualizing random priors on the simplex.

randomstart#

Plot random points on the 2-simplex, rounded to rational coordinates.

Green dots are the raw sampled points; red circles are their rounded rational approximations.

Usage

randomstart [OPTIONS]

Options

--numpoints <num_points>#

Number of points plotted

Default:

200

--accuracy <INTEGER>#

Denominator x: coordinates are rounded to multiples of 1/x that sum to 1

Default:

20

--higherdim <INTEGER>#

Dimension from which the middle 3 components will be sampled

Default:

3

--naiveplot#

Sample naively by normalizing random uniforms (biased toward center)

Examples#

Plot 300 points, rounded to multiples of 1/30 that sum to 1:

$ randomstart --numpoints 300 --accuracy 30

num_points=300 accuracy=30 higher_dim=3 naive_plot=False
../_images/randomstart-1.png

Note

Your plot will differ, since new random points are generated each time you run the command.

A finer rounding grid:

$ randomstart --numpoints 300 --accuracy 100

Sample naively, by normalizing independent uniform numbers (this is biased towards the centre of the triangle):

$ randomstart --numpoints 300 --accuracy 30 --naiveplot

Sample from a higher-dimensional simplex, showing only the middle three components:

$ randomstart --numpoints 300 --accuracy 30 --higherdim 6

num_points=300 accuracy=30 higher_dim=6 naive_plot=False
show positions 2 .. 4 of 0 .. 5