lifetheater57 / MHA

0 stars 0 forks source link

How do we generate simulated samples? #1

Open lifetheater57 opened 1 year ago

lifetheater57 commented 1 year ago

We first generate W, a matrix that associates each dimension of the observations to a dimension of the latent space (i.e. a single latent variable), G^(i), a covariance matrix for each i class and ̀v^(i), a noise factor for each i class.

Then, we generate a vector in latent space according to G^(i): Z^(i) ~ N(0, G^(i)).

Then, we generate an observation given Z^(i): X^(i)|Z^(i) = x^(i) ~ N(W*z^(i), v^(i)*I).

It means that G^(i) controls the co-variance between the latent variables and then the value in each dimension of the sample is generated around a re-scaling of the latent variable.

hermancollin commented 1 year ago

J'ai push un squelette pour le générateur de données synthétiques. Ça serait actually un générateur donc on va pouvoir s'en servir comme ça dans le dataloader:

params = [...]
generator = Gaussian_generator(params)
for _ in range(200):
    new_example = next(generator)