real-projective-planes: Sample (with noise) from real projective planes

real-projective-planesR Documentation

Sample (with noise) from real projective planes

Description

These functions generate uniform samples from real projective planes in 4-dimensional space, optionally with noise.

Usage

sample_projective_plane(n, sd = 0)

Arguments

n

Number of observations.

sd

Standard deviation of (independent multivariate) Gaussian noise.

Details

The real projective plane only embeds into a Euclidean space of dimension at least 4. This embedding is adapted from Wikipedia. The uniform sample is generated through a rejection sampling process as described by Diaconis, Holmes, and Shahshahani (2013).

References

P Diaconis, S Holmes, and M Shahshahani (2013) Sampling from a Manifold. Advances in Modern Statistical Theory and Applications: A Festschrift in honor of Morris L. Eaton, 102–125. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/12-IMSCOLL1006")}

Examples

set.seed(22764L)

# real projective plane embedding in 4-space
x <- sample_projective_plane(120)
pairs(x, asp = 1, pch = 19, cex = .5)

tdaunif documentation built on Sept. 10, 2023, 5:07 p.m.