name: op-mat-pca
description: Principal component analysis of a battery — loadings and eigenvectors (p × k, rectangular), every eigenvalue with explained / cumulative shares, communalities, KMO (overall and per member) and Bartlett's sphericity test; correlation or covariance input, listwise or pairwise, weighted.
kind: operator
category: MAT
operator: MAT_PCA
type: reference
applies_to: process, compose, predict
examples_tags: [matrix, correlation-analysis]
Use when
How many underlying dimensions a set of related measures covers and which measures belong to each, so a few summaries can stand in for many.
Questions it answers:
- How many distinct things do these twelve rating questions actually measure?
- Is this set of measures correlated enough to be worth summarising into components?
Use something else:
MAT_CORRELATIONwhen you only want to see which measures go together, pair by pair.
Params
| Name | Type | Default | Description |
|---|---|---|---|
on | enum | correlation | Or covariance, which keeps units: a large-spread member dominates. |
components | any | kaiser | Int k (≤ p), kaiser (λ > 1, default) or {variance: s}; required on covariance. |
rotation | enum | none | k ≥ 2, orthogonal: varimax, quartimax, geomin_orthogonal, entropy. |
epsilon | float | 0.01 | Geomin ε, > 0; larger smooths. |
repair | enum | — | nearest: decompose the nearest correlation matrix (rescaled on covariance; multivariate-design). |
missing | enum | listwise | Pairwise adds auxiliary.n (matrix-results). |
max_drop_share | float | — | 0–1: listwise drop-share warning. |
fit | string | — | Emit from a bound vector fit’s listwise state, reading no row (vector-row-scores). |
weight, encoding: as op-mat-correlation. Oblique: SERVICE_VALIDATION rotation_oblique_unsupported.
Inputs
Integer / float members.
Output
primary: loadings (eigenvector · √λ), PC1…PCk. auxiliary: eigenvectors, n (pairwise), unrotated. vectors: eigenvalues, explained_variance, cumulative, communalities, kmo_msa, rotated_variance. scalars: kmo, bartlett_*, components_retained.
Reading the output
primary.values: Each cell is a loading: how strongly the row’s measure is tied to the column’s component, the correlation between the two on a correlation input. A component is named by the measures with the largest loadings; components are listed from the one that summarises the most spread down.scalars.kmo: The Kaiser-Meyer-Olkin measure of sampling adequacy: how much of the measures’ correlation is shared across the whole set rather than tied to single pairs, from 0 to 1. Higher means a component summary is more worthwhile.
Contract
- Member types (
vector,fields):f32,f64,packed_bool,u16,u32,u4,u64,u8(packed_boolonly undercoerce: "binary"; avec_*field’s elements are members); any other isPULSE_VECTOR_MEMBER_TYPE. - Weight: weighted under
frequencyandprobabilityweights. - Streaming: streamable; partial states merge; components
mergeable. - Components:
n,n_null,n_listwise_dropped; optionalmin_pair_n,max_pair_n,sum_weights,n_eff,n_weight_invalid.
Gotchas
- Signs are free; rotated, read
rotated_variance. - Bartlett’s n: rows, Σw or n_eff, pairwise the smallest pair’s own. A pairwise weighted covariance scales each entry by its own pair.
- Singular: KMO, Bartlett null (
PULSE_MATRIX_SINGULAR). Non-PSD pairwise:PULSE_MATRIX_NOT_PSDunlessrepair.
See
pulse_examples_search tags=[matrix, correlation-analysis]- Skills:
multivariate-outputs,op-mat-correlation