Learn R Programming

RiemStiefel (version 0.1.1)

st.runif: Generate Random Samples from Uniform Distribution on Stiefel Manifold

Description

It generates \(n\) random samples from Stiefel manifold \(St(p,r)\) according to the procedure described in the reference.

Usage

st.runif(n, p, r, rtype = c("list", "array"))

Arguments

n

number of samples to be generated.

p

original dimension (of the ambient space).

r

dimension of the frame.

rtype

return type; either 3d-array ("array") or list ("list").

Value

a length \(n\) list or 3d array of size \((p,r,n)\).

References

chikuse_statistics_2003RiemStiefel

Examples

Run this code
# NOT RUN {
## let's simply draw 3 times from St(10,5)
dat3 = st.runif(3, 10, 5, rtype="array")

## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
image(dat3[,,1], main="sample 1")
image(dat3[,,2], main="sample 2")
image(dat3[,,3], main="sample 3")
par(opar)

# }

Run the code above in your browser using DataLab