Analysis & explainability

Find the plane in the cloud: principal component analysis

Run PCA on a 3-D point cloud in the browser, watch the variance collapse onto two components, and end at the real sealed measurement of the production kernel.

intermediate ≈ 16 min

read

The model

High-dimensional data often lives near a low-dimensional surface. This runner draws a cloud of points in three dimensions whose signal fills a plane, with a tunable amount of noise pushing points off it, and then rotates the whole cloud so no principal axis lines up with a coordinate axis. Principal component analysis finds the directions of greatest variance directly from the data, with no labels.

read

The eigenvalues are the variances

PCA centres the data, forms the sample covariance matrix, and diagonalises it. The eigenvectors are the principal directions; the eigenvalues are the variance captured along each one. Keep the top components whose eigenvalues dominate and you keep almost all the variance in fewer dimensions. The runner computes the eigenvalues exactly with the Jacobi method — no approximation, no random projection.

read

The claim boundary

The cloud is synthetic and drawn from a fixed-seed PRNG, so every run with the same parameters replays identically. The reconstruction error of dropping the smallest component is exactly the variance that component carried — the model knows its own residual, which is what makes it a bounded educational model rather than a measurement.

run

Run the analysis

With low off-plane noise the first two components explain almost all the variance and the reconstruction error is tiny — the cloud is essentially two-dimensional. Turn the noise up and watch the third component's variance grow and the top-two explained fraction fall: the data genuinely fills three dimensions now, and no honest reduction can hide it.

2,000
0.60
verify

Inspect the evidence, then meet the real kernel

The bundle records the variance of each component, the fraction the top two explain, and the reconstruction RMSE, with the exact parameters that produced them, admitted only as a bounded model. The production counterpart is sc-neurocore's dimensionality kernel — measured for real across five language backends, sealed, and recorded in the transparency log. The table below is that measurement, loaded from the shipped databank itself; note that the Python reference outruns the Rust port on this kernel, a contradiction the platform publishes rather than hides.

The real, sealed measurement

The browser model above is a bounded educational kernel. The production kernel is measured for real: dimensionality in the sc-neurocore 3.15.35 benchmark databank, sealed and recorded in the transparency log.

Metric rustmojojuliagopython
median_call_ms (ms) 12.022684 54.576435 593.578842 84.96713 6.280014

Open the full benchmark databank →

In context

Part of these topics.

The research topics this lesson sits inside — the science, the studios, and the literature.