Latent variable
A latent variable is an unobserved quantity represented or inferred by a model to capture underlying structure in observed data.
Causal AI
A latent variable is an unobserved variable in a statistical model, here represented as a lower-dimensional continuous encoding of image causes.
- How it is used
- Represents unobserved parts of a data-generating process when modeling observed data, causal relationships, images, or partially observable decisions.
- How deep it goes
- Defines latent variables, explains marginalization and identification limits, and implements estimation and image encoding; learned encodings are not established as actual causes.
- Examples
- Uses unseen rock-impact strength, unrecorded survey education, unobserved smoking-related genetics, and lower-dimensional digit-image encodings.
- What you can do after
- Apply it via pgmpy to estimate parameters with a latent survey node, while checking whether category labels and causal quantities are identifiable.
Data Without Labels
A latent variable is an unobserved variable inferred from observed data and a statistical model.
- How it is used
- Supports Gaussian mixture clustering when data points may have incomplete values or ambiguous generating distributions.
- How deep it goes
- Explains latent-value estimation through EM’s alternating probability and parameter-estimation steps, without developing the full equations.
- Examples
- Uses data points generated by multiple Gaussian distributions and assigns probabilistic cluster memberships.
- What you can do after
- Apply it via EM to infer uncertain cluster memberships while fitting Gaussian mixture parameters.
Machine Learning Algorithms in Depth
A latent variable is an unobserved variable inferred through its probabilistic relationship with observed data.
- How it is used
- Uses latent states to explain and infer hidden structure in time-series observations.
- How deep it goes
- Derives forward and forward–backward recursions and implements the HMM algorithm, without extending beyond the stated discrete-emission case.
- Examples
- Illustrates sleep–wake cycles, stock prediction, DNA sequencing, handwriting recognition, speech recognition, and latent-state comparison.
- What you can do after
- Build it from scratch by implementing forward–backward inference and comparing inferred states with ground truth.
Read how Machine Learning Algorithms in Depth explains latent variable →
Related concepts
- encoderproduced by · An encoder is a component that transforms input data into an encoded representation for subsequent processing, reconstruction, comparison, or transmission.
- statistical independence testcontrasts with · A statistical independence test is a hypothesis-testing procedure that evaluates whether variables are statistically independent or conditionally independent based on observed data.
- retrieved documentincludes · A retrieved document is information selected by an information-retrieval process from a source and supplied as context or evidence for a query or task.
- causal graphical modelused by · A causal graphical model is a probabilistic or structural model whose graph represents causal relationships and whose mechanisms support reasoning about interventions.
- variational autoencoderpart of · A variational autoencoder is a generative neural network that learns a probabilistic latent representation of data and decodes samples from it to reconstruct or generate data.
- exogenous variableincludes · An exogenous variable is a causal input whose variation originates outside the endogenous system represented by a structural causal model.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


