randomProfile {jointseg} | R Documentation |
Generate a random multi-dimensional profile with breakpoints and noise
Description
Generate a random multi-dimensional profile with breakpoints and noise
Usage
randomProfile(length, nBkp, noiseLevel, dim, minLength = 0)
Arguments
length |
length of the profile |
nBkp |
number of breakpoints |
noiseLevel |
variance of the signal between two breakpoints |
dim |
dimension of the profile |
minLength |
minimum length of region between breakpoints by default minLength = 0 |
Details
Generate a random profile (vector) of length length
, with nBkp
breakpoints randomly chosen. Between two breakpoints, the profile is
constant, uniformly chosen between 0 and 1, and a Gaussian noice of variance
noiseLevel
is added.
Value
a list
with elements
- profile
the profile (a
length
bydim
matrix)- bkp
the list of breakpoints positions (the last position at the left of a breakpoint)
Note
This implementation is derived from the MATLAB code by Vert and Bleakley: http://cbio.ensmp.fr/GFLseg.
Author(s)
Morgane Pierre-Jean and Pierre Neuvial
Examples
len <- 1e4
nBkp <- 10
noiseLevel <- 1
dim <- 2
sim <- randomProfile(len, nBkp, noiseLevel, dim)
res <- doGFLars(sim$profile, K=5*nBkp)
str(res)