simulateData {bgmm} | R Documentation |
Dataset generation
Description
The function simulateData
generates an artificial dataset from a mixture of Gaussian components with a given set of parameters.
Usage
simulateData(d = 2, k = 4, n = 100, m = 10, mu = NULL, cvar = NULL,
s.pi = rep(1/k, k), b.min = 0.02, mean = "D", between = "D",
within = "D", cov = "D", n.labels = k)
Arguments
d |
the dimension of the data set, |
k |
the number of the model components, |
n |
the total number of observations, both labeled and unlabeled, |
mu |
a matrix with |
cvar |
a three-dimensional array with the dimensions ( |
s.pi |
a vector of |
mean , between , within , cov |
constraints on the model structure. By default all are equal to "D". If other values are set, the parameters |
m |
the number of the observations, for which the beliefs are to be calculated, |
b.min |
the belief that an observation does not belong to a component. Formally, the belief bij for the observation i to belong to component j is equal |
n.labels |
the number of components used as labels, defining the number of columns in the resulting beliefs matrix. By default |
Value
An list with the following elements:
X |
the matrix of size n-m rows and d columns with generated values of unlabeled observations, |
knowns |
the matrix of size m rows and d columns with generated values of labeled observations, |
B |
the belief matrix of the size m rows and k columns derived for knowns matrix, |
model.params |
the list of model parameters, |
Ytrue |
indexes of the true Gaussian components from which each observation was generated. Lables for knowns go first. |
Author(s)
Przemyslaw Biecek
References
Przemyslaw Biecek, Ewa Szczurek, Martin Vingron, Jerzy Tiuryn (2012), The R Package bgmm: Mixture Modeling with Uncertain Knowledge, Journal of Statistical Software.
Examples
simulated = simulateData(d=2, k=3, n=300, m=60, cov="0", within="E", n.labels=2)
model = belief(X = simulated$X, knowns = simulated$knowns, B=simulated$B)
plot(model)
simulated = simulateData(d=1, k=2, n=300, m=60, n.labels=2)
model = belief(X = simulated$X, knowns = simulated$knowns, B=simulated$B)
plot(model)