data.simulation: Simulating subspace clustering data

Description Usage Arguments Value Examples

View source: R/data.simulation.R

Description

Generating data for simulation with a low-rank subspace structure: variables are clustered and each cluster has a low-rank representation

Usage

1
2
data.simulation(n = 100, SNR = 1, K = 10, numb.vars = 30, max.dim = 2,
  equal.dims = TRUE)

Arguments

n

an integer, number of individuals

SNR

a numeric, signal to noise ratio measured as variance of the variable, element of a subspace, to the variance of noise

K

an integer, number of subspaces

numb.vars

an integer, number of variables in each subspace

max.dim

an integer, if equal.dims is TRUE then max.dim is dimension of each subspace. If equal.dims is FALSE then subspaces dimensions are drawn from uniform distribution on [1,max.dim]

equal.dims

a boolean, if TRUE (value set by default) all clusters are of the same dimension

Value

A list consisting of:

X

matrix, generated data

signals

matrix, data without noise

dims

vector, dimensions of subspaces

factors

matrix, factors subspaces

s

vector, true partiton of variables

Examples

1
2
3
sim.data <- data.simulation()
sim.data2 <- data.simulation(n = 30, SNR = 2, K = 5, numb.vars = 20,
                             max.dim = 3, equal.dims = FALSE)

psobczyk/public_varclust documentation built on May 26, 2019, 10:33 a.m.