lol.sims.fat_tails: Fat Tails Simulation

Description Usage Arguments Value Details Author(s) Examples

View source: R/simulations.R

Description

A function for simulating from 2 classes with differing means each with 2 sub-clusters, where one sub-cluster has a narrow tail and the other sub-cluster has a fat tail.

Usage

1
2
lol.sims.fat_tails(n, d, rotate = FALSE, f = 15, s0 = 10, rho = 0.2,
  t = 0.8, priors = NULL)

Arguments

n

the number of samples of the simulated data.

d

the dimensionality of the simulated data.

rotate

whether to apply a random rotation to the mean and covariance. With random rotataion matrix Q, mu = Q*mu, and S = Q*S*Q. Defaults to FALSE.

f

the fatness scaling of the tail. S2 = f*S1, where S1_ij = rho if i != j, and 1 if i == j. Defaults to 15.

s0

the number of dimensions with a difference in the means. s0 should be < d. Defaults to 10.

rho

the scaling of the off-diagonal covariance terms, should be < 1. Defaults to 0.2.

t

the fraction of each class from the narrower-tailed distribution. Defaults to 0.8.

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.

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.fat_tails(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.