pca_components
std.stats.pca_components · Level L4The principal axes of a data set, as columns, largest variance first: the right singular vectors of the centred data, each signed so its largest component is positive.
Signature
pca_components(X: f64[p+k, p]) → f64[p, p]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Agrees with the reference
eigh(Xcᵀ·Xc) vectors, largest first, signs fixedto 80 digits (100-digit arithmetic), on all 40 test cases. - All 1,018 float64 results inside the running error bound; the closest uses 10% of it.
- Interpreter and NumPy backend return bit-identical results.
- correctly rounded (the float64 nearest the exact value)
- 7%
- bit-equal to the NumPy formula in float64
- 6%
- largest error, in units in the last place
- 1.3e+4
Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.
Note
The axes come from the SVD of the centred data; the reference takes the eigenvectors of its scatter matrix instead, so two different routes have to agree. Too-close variances, or a sign that could flip, are refused.
Identity
sha256:afa30853e74e67344203c65c539f903117a39fd5c9f84a2348b7c43e9e3103a1The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.stats.pca_components · Ω:pca_components
- Pins
sha256:619ec37827d00cbf4c1bb9cfffa38728ce18cd01427f8aa5172480b4318f0b87this graph alone- Evidence
sha256:df857618b3c239e6b32dfbafb23983b9b37f893d3d15184a814a9b26cd3a5f69the hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.