The library documents itself · Numeric & optimization
stzPCA
28 own methods · 5 forms written with extensions, listed under their method
the source: base/number/stzPCA.ring(opens in a new tab) · All classes · The area reference: Numeric & optimization
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 0 come from the library's tests; 6 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzPCA([ [1,2] ]). 22 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
NumberOfSamples
(no comment in the source: the name reads as a sentence) number of samplesno extension
composed example
o1 = new stzPCA([ [1,2] ]) ? o1.NumberOfSamples() #--> 1composed from the signature, run for this page
NumberOfFeatures
(no comment in the source: the name reads as a sentence) number of featuresno extension
composed example
o1 = new stzPCA([ [1,2] ]) ? o1.NumberOfFeatures() #--> 2composed from the signature, run for this page
Center
THE NAME FORM CARRIES THE SEMANTICS, which is a Softanza law rather than a style: an ACTIVE verb -- Standardize(), Center() -- DOES the thing and returns nothing; the PASSIVE form -- Standardized(), Centered() -- returns the transformed DATA and leaves the object alone; and the Q twin does the thing and returns the object so calls chain. The first version of this class had Standardized() mutating the analysis and returning This, which got both halves wrong at once: a passive name for an active act, and a plain method returning an object where plain methods return data. CENTER each feature on its mean and leave the units alone -- covariance PCA. The features that vary most, in their own units, dominate.QCSXTZZZIBWU
Standardize
CENTER and then divide each feature by its standard deviation -- correlation PCA. Every feature counts equally, whatever it was measured in.QCSXTZZZIBWU
Centered
── and the passive forms, which return the prepared DATA ── The data centered on the column means, original untouched. This is what a covariance PCA actually decomposes, so it is worth being able to look at.no extension
composed example
o1 = new stzPCA([ [1,2] ]) ? @@( o1.Centered() ) #--> [ [ 0, 0 ] ]composed from the signature, run for this page
Standardized
The data centered AND divided by the column standard deviations. What a correlation PCA decomposes.no extension
IsStandardized
(no comment in the source: the name reads as a sentence) is standardizedno extension
composed example
o1 = new stzPCA([ [1,2] ]) ? o1.IsStandardized() #--> 0composed from the signature, run for this page
UseSampleVariance
── the variance convention, from the library's one authority ──QCSXTZZZIBWU
UsePopulationVariance
(no comment in the source: the name reads as a sentence) use population varianceQCSXTZZZIBWU
UsesSampleVariance
(no comment in the source: the name reads as a sentence) uses sample varianceno extension
composed example
o1 = new stzPCA([ [1,2] ]) ? o1.UsesSampleVariance() #--> 1composed from the signature, run for this page
Fit
(no comment in the source: the name reads as a sentence) fitQCSXTZZZIBWU
IsFitted
(no comment in the source: the name reads as a sentence) is fittedno extension
composed example
o1 = new stzPCA([ [1,2] ]) ? o1.IsFitted() #--> 0composed from the signature, run for this page
NumberOfComponents
(no comment in the source: the name reads as a sentence) number of componentsno extension
Components
The sign is fixed by convention (the largest loading of each component is made positive) because a direction has no preferred sign -- v and -v are the same axis explaining the same variance -- and without a convention two runs can look like they disagree.also written: Loadingsno extension
Scores
The data in component coordinates: row i is sample i, column j its position along component j. Centered by construction, so each column averages zero.no extension
SingularValues
(no comment in the source: the name reads as a sentence) singular valuesno extension
ExplainedVariance
How much variance each component accounts for, in the units of the prepared data. These SUM to TotalVariance() -- the decomposition redistributes the variance and cannot create or destroy any.no extension
TotalVariance
(no comment in the source: the name reads as a sentence) total varianceno extension
ExplainedVarianceRatio
The same, as fractions of the total. This is the number people quote.no extension
CumulativeVarianceRatio
(no comment in the source: the name reads as a sentence) cumulative variance rationo extension
NumberOfComponentsFor
How many components to keep to retain a given fraction of the variance -- the usual way the number of components is chosen.no extension
Mean
The centering that was applied, kept because projecting NEW data needs exactly the same one. Data centered on its own mean lands in a different space.no extension
Scale
(no comment in the source: the name reads as a sentence) scaleno extension
Inverse
That identity is checked in the guard, and it is a far stronger statement than any reconstruction number the learned inverses can offer. It says the arithmetic is RIGHT, where they can only say the result looked plausible.no extension
Reconstructed
the training rows put through Transform() and back again -- what the analysis retained of the data it was given, which is the picture worth looking at when deciding how many components are enoughno extension
Transform
(no comment in the source: the name reads as a sentence) transformno extension
Why
(no comment in the source: the name reads as a sentence) whyno extension

