addNoise_spd: addNoise_spd

Description Usage Arguments Examples

View source: R/addnoise_spd.R

Description

Adds random noise to an SPD matrix, given a signal to noise ratio. Signal and Noise are measured as distance on the SPD manifold. If A is the SPD matrix, N is the noise matrix, and I is the identity matrix, then Signal=dist(I,A), Noise=dist(A,N)), and SNR = Signal/Noise.

Usage

1
addNoise_spd(A, SNR = 1)

Arguments

A

An SPD matrix which will be noisified.

SNR

Signal to Noise ratio to be used in generating the noise. SNR must be larger 0.

Examples

1
2
3
4
set.seed(623766)
A = randspd_FAST(n=5)
SNR=.25
addNoise_spd(A,SNR=SNR)

mrparker909/MGLMRiem documentation built on March 19, 2020, 3:37 p.m.