powered by
A function for Generating a spiral simulation.
mgc.sims.spiral(n, d, eps = 0.4, a = 0, b = 5)
the number of samples for the simulation.
the number of dimensions for the simulation setting.
the noise level for the simulation. Defaults to 0.5.
0.5
the lower limit for the data matrix. Defaults -1.
-1
the upper limit for the data matrix. Defaults to 1.
1
a list containing the following:
X
[n, d] the data matrix with n samples in d dimensions.
[n, d]
n
d
Y
[n] the response array.
[n]
Given: \(U \sim U(a, b)\) a random variable. Simumlates \(n\) points from \(Spiral(X, Y) \in \mathbf{R}^d \times \mathbf{R}\) where: \(X_i = U\, \textrm{cos}(\pi\, U)^d\) if i = d, and \(U\, \textrm{sin}(\pi U)\textrm{cos}^i(\pi U)\) otherwise $$Y = U\, \textrm{sin}(\pi\, U) + \epsilon p N(0, 1)$$
i = d
For more details see the help vignette: vignette("sims", package = "mgc")
vignette("sims", package = "mgc")
# NOT RUN { library(mgc) result <- mgc.sims.spiral(n=100, d=10) # simulate 100 samples in 10 dimensions X <- result$X; Y <- result$Y # }
Run the code above in your browser using DataLab