lol.sims.cross: Cross

Description Usage Arguments Value Details Author(s) Examples

View source: R/simulations.R

Description

A simulation for the cross experiment, in which the two classes have orthogonal covariant dimensions and the same means.

Usage

1
2
lol.sims.cross(n, d, rotate = FALSE, priors = NULL, a = 1, b = 0.25,
  K = 2)

Arguments

n

the number of samples of simulated data.

d

the dimensionality of the simulated data.

rotate

With random rotataion matrix Q, mu = Q*mu, and S = Q*S*Q. Defaults to FALSE.

priors

the priors for each class. If NULL, class priors are all equal. If not null, should be |priors| = K, a length K vector for K classes. Defaults to NULL.

a

scalar for the magnitude of the variance that is high within the particular class. Defaults to 1.

b

scalar for the magnitude of the varaince that is not high within the particular class. Defaults to 2.

K

the number of classes. Defaults to 2.

Value

A list of class simulation with the following:

X

[n, d] the n data points in d dimensions as a matrix.

Y

[n] the n labels as an array.

mus

[d, K] the K class means in d dimensions.

Sigmas

[d, d, K] the K class covariance matrices in d dimensions.

priors

[K] the priors for each of the K classes.

simtype

The name of the simulation.

params

Any extraneous parameters the simulation was created with.

Details

For more details see the help vignette: vignette("sims", package = "lolR")

Author(s)

Eric Bridgeford

Examples

1
2
3
library(lolR)
data <- lol.sims.cross(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y

neurodata/lol documentation built on Oct. 17, 2018, 8:58 a.m.