rrm: Random rotation matrix

View source: R/rrm.R

rrmR Documentation

Random rotation matrix

Description

Generates a random rotation matrix as described in Blaser and Fryzlewicz (2016).

Usage

rrm(n)

Arguments

n

Integer specifying the dimension of the resulting (square) random rotation matrix.

Value

An n-by-n matrix (i.e., an object of class c("matrix" "array").

Source

https://www.jmlr.org/papers/volume17/blaser16a/blaser16a.pdf.

References

Rico Blaser and Piotr Fryzlewicz. Random rotation ensembles. Journal of Machine Learning Research, 17:1–26, 2016.

Examples

(R <- rrm(3))
det(R)  # determinant should always be +1
solve(R)  # R^{-1} = R'
t(R)  # R^{-1} = R'

bgreenwell/treemisc documentation built on Oct. 26, 2022, 12:56 a.m.