Learn R Programming

treemisc (version 0.0.1)

rrm: Random rotation matrix

Description

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

Usage

rrm(n)

Value

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

Arguments

n

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

References

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

Examples

Run this code
(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