Interactive Principal Component Analysis operator for Tercen, implemented in Flutter. Replaces the ShinyR implementation at pca_shiny.
| Input projection | . |
|---|---|
y-axis |
numeric measurement values |
row |
variables (features/spots) — one row per variable |
column |
observations (samples) — one column per sample |
colors |
(optional) categorical factor used as the default Color By in the viewer |
The input is interpreted as an observations × variables matrix: each column becomes a point projected onto the principal components, and each row becomes a loading vector.
| Output relations | . |
|---|---|
PC1..PCn |
score for each observation on each principal component |
X1..Xn |
loading for each variable on each principal component |
Operator view |
interactive 3D scores, biplot, pairs, and scree plots |
Scores and loadings are returned together as a single flat cross-tab (one row per observation × variable pair), matching the output format of pca_shiny.
These are set on the operator before the app opens. They control the computation itself — the viewer controls only change what's displayed.
PCA is computed once at app startup using the factors above. All interactive controls in the viewer (view mode, color-by, label-by, 3D axis selection, biplot thresholds, number of components to display) affect only rendering — they do not change the underlying computation. To change the computation, update the operator properties and re-run the step.
The implementation uses the dual PCA / Gram-matrix formulation (Householder tridiagonalisation + QL iteration for the eigendecomposition), which is efficient for the common Tercen case of many variables and relatively few observations.
pca_shiny — original ShinyR implementation
