A map that can bend: the GP latent variable model
The GPLVM places rows so every variable is a smooth function of their positions. With a linear kernel it is probabilistic PCA; with a radial basis kernel the map can bend. Experimental.
What runs in CodeSplash
- GP latent variable map Experimental
You will be able to
- Say how a GPLVM differs from PCA and from t-SNE or UMAP
- Read the noise SD and log likelihood of a fitted map
- Know why rows beyond the row limit are left out
PCA, turned around
ReadPCA asks which directions of the data carry the most variance. The GP latent variable model asks the reverse: which positions for the rows, in two dimensions, would let every variable be a smooth function of those positions plus noise? Each variable gets its own Gaussian process over the same positions.
| Kernel | What the map can do |
|---|---|
| Linear (probabilistic PCA) | Only rotate and stretch: the positions span the principal-component plane |
| Radial basis (nonlinear) | Bend, so curved structure can unroll |
The fit starts from the PCA scores and moves every row to raise the posterior, with a standard normal prior that keeps the map from drifting.
What does the noise say?
PredictPredict first
On the four iris measurements (standardized), which map leaves less noise around its smooth functions?
Reveal
The radial basis map, with a noise SD of 0.0840 against 0.205 for the linear one. Bending lets two dimensions explain more of each variable. Its log likelihood is 281, against 46.7.
Reading the map
ReadThe map is rotated so its first dimension has the most spread (latent SD 0.621 on iris), with signs fixed, so Python and R draw the same picture. Distances in the map mean "these rows have similar values on every variable". Unlike t-SNE and UMAP, the GPLVM is a model of the variables themselves, so its log likelihood can compare kernels on the same rows.
Its limits
ReflectA GPLVM moves every row's position during the fit, and it has no formula to place a new row. Above Most rows to map (500 by default) it maps evenly spaced rows and leaves the others out, and the result says how many. With the US arrests data capped at 40 of 50 states, 40 rows were mapped.
The fit also starts from one place and finds a nearby optimum. Would you trust a cluster you see only in this map, or check it in PCA and UMAP too?
Check your understanding
CheckpointCheck yourself
A GPLVM with the linear kernel is fitted to standardized data. Which plane do its two latent dimensions span?
Show the answer
Answer: a
With a linear kernel the GPLVM is probabilistic PCA, so the positions span the principal subspace. Only the radial basis kernel lets the map bend.
Check yourself
Your table has 3,000 rows and the map's row limit is 500. What happens to the other 2,500?
Show the answer
Answer: b
The positions are fitted parameters, one per mapped row. Raise Most rows to map (the fit gets slower) or use PCA, which projects every row.
Set it up
In the appIn Discover, choose Map the data, then GP latent variable map (Experimental). Pick numeric Variables, a Kernel and the Latent dimensions; Color points by only colors the map.
Recap
Recap- A GPLVM finds positions that make every variable a smooth function of them.
- Linear kernel = probabilistic PCA; radial basis lets the map bend.
- Lower noise SD and higher log likelihood mean the map explains the variables better.
- Rows beyond the row limit are left out, and the fit finds a local optimum.
Concepts in this lesson