discr.sims.cross: Discriminability Cross Simulation

Description Usage Arguments Author(s) Examples

View source: R/simulations.R

Description

A function to simulate data with the same mean that spreads as class id increases.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
discr.sims.cross(
  n,
  d,
  K,
  signal.scale = 10,
  non.scale = 1,
  mean.scale = 0,
  rotate = FALSE,
  class.equal = TRUE,
  ind = FALSE
)

Arguments

n

the number of samples.

d

the number of dimensions.

K

the number of classes in the dataset.

signal.scale

the scaling for the signal dimension. Defaults to 10.

non.scale

the scaling for the non-signal dimensions. Defaults to 1.

mean.scale

whether the magnitude of the difference in the means between the two classes. If a mean scale is requested, d should be at least > K.

rotate

whether to apply a random rotation. Defaults to TRUE.

class.equal

whether the number of samples/class should be equal, with each class having a prior of 1/K, or inequal, in which each class obtains a prior of k/sum(K) for k=1:K. Defaults to TRUE.

ind

whether to sample x and y independently. Defaults to FALSE.

Author(s)

Eric Bridgeford

Examples

1
2
library(mgc)
sim <- discr.sims.cross(100, 3, 2)

mgc documentation built on July 1, 2020, 7:09 p.m.