lol.sims.xor2: Xor Problem

Description Usage Arguments Value Details Author(s) Examples

View source: R/simulations.R

Description

A function to simulate from the 2-class xor problem.

Usage

1
lol.sims.xor2(n, d, priors = NULL, fall = 100)

Arguments

n

the number of samples of the simulated data.

d

the dimensionality of the simulated data.

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.

fall

the falloff for the covariance structuring. Sigma declines by ndim/fall across the variance terms. Defaults to 100.

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.xor2(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y

lolR documentation built on July 8, 2020, 7:35 p.m.