liveBook · Manning

Variance

As explained in Deep Learning with R, Third Edition

Variance is a statistical measure of the squared variability of values around their mean.

Variance measures squared variability around a mean. In a variational autoencoder, it helps describe the probability distribution associated with an input image alongside the mean. section 17.1.2

The encoder produces z_mean and z_log_var rather than one fixed latent code. Variance represents the distribution’s randomness, allowing the model to sample nearby latent points and decode them into similar valid images. section 17.1.2

Sampling a latent point

A VAE encodes an image, samples z using the mean, log variance, and random noise, then sends z through the decoder: z = z_mean + exp(0.5 * z_log_var) * epsilon.

How Deep Learning with R, Third Edition covers it

How deep it goes
Explains variance as a distribution parameter and shows its role in latent sampling, without deriving statistical formulas.
Examples
Uses image encoding, z_mean, z_log_var, epsilon, latent sampling, and reconstruction as concrete examples.
What you can do after
Understand how variance controls stochastic latent sampling in a variational autoencoder.
How it connects
Connects variance with mean, probability distributions, variational autoencoders, latent spaces, encoders, decoders, and random sampling.

Also explained in

Compare how 19 books explain variance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with R, Third Edition. The section links point to the parts of the book it draws on.