powered by
Generates a random rotation matrix as described in Blaser and Fryzlewicz (2016).
rrm(n)
An n-by-n matrix (i.e., an object of class c("matrix" "array").
n
c("matrix" "array")
Integer specifying the dimension of the resulting (square) random rotation matrix.
Rico Blaser and Piotr Fryzlewicz. Random rotation ensembles. Journal of Machine Learning Research, 17:1–26, 2016.
(R <- rrm(3)) det(R) # determinant should always be +1 solve(R) # R^{-1} = R' t(R) # R^{-1} = R'
Run the code above in your browser using DataLab