Description Usage Arguments Value Details Author(s) Examples
A function for Generating an uncorrelated bernoulli simulation.
1 | mgc.sims.ubern(n, d, eps = 0.5, p = 0.5)
|
n |
the number of samples for the simulation. |
d |
the number of dimensions for the simulation setting. |
eps |
the noise level for the simulation. Defaults to |
p |
the bernoulli probability. |
a list containing the following:
|
|
|
|
Given: w[i] = 1/i is a weight-vector that scales with the dimensionality. Simumlates n points from Wshape(X, Y) where:
U ~ B(p)
X ~ B(p)^d + eps*N(0, I_d)
Y = (2*U-1)w^T*X + 0.5*eps*N(0, 1)
For more details see the help vignette:
vignette("sims", package = "mgc")
Eric Bridgeford
1 2 3 | library(mgc)
result <- mgc.sims.ubern(n=100, d=10) # simulate 100 samples in 10 dimensions
X <- result$X; Y <- result$Y
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.