Data Lab node
PCA
Principal components of a multi-channel Signal over its window: Scores is the data in the new basis (“PC1 (61 %)”…), Basis the orthonormal loadings as a matrix (rows = components, columns = channels — the Q of a basis change), Explained the variance fractions, Dominant the first component’s loadings. Signs and the order of near-equal components are held steady between frames so nothing flips. Standardize uses the correlation matrix so channels with big units do not dominate.
Inputs
| Port | Type | Default |
|---|---|---|
| SignalA multi-channel Signal (2…64 channels): every channel is a dimension. | structure | — |
| ComponentsHow many components to keep (0 = all). | int | 3 |
| StandardizeUse the correlation matrix instead of the covariance, so channels with big units do not dominate. | bool | false |
| Update RateHow many times per second the analysis is recomputed (default 10); 0 = every frame. Lower rates save CPU on long windows — a moved parameter always recomputes at once. | float | 10 |
Outputs
| Port | Type |
|---|---|
| Scores | structure |
| Basis | structure |
| Explained | float |
| Dominant | float |
| Latest | float |
| Total Variance | float |
How It Works
PCA finds the principal components of a multi-channel Signal over its window — the directions in channel space along which the data actually varies.
Scores is the data expressed in the new basis, with components labelled by how much they explain ("PC1 (61 %)"). Basis is the orthonormal loadings as a matrix (rows are components, columns are channels — the change-of-basis matrix). Explained gives the variance fractions and Dominant the first component's loadings.
Two details make it usable live rather than only in a notebook. Signs and the order of near-equal components are held steady between frames, so the picture does not flip every time two components swap by a hair. And Standardize uses the correlation matrix instead of the covariance matrix, so channels with big units do not dominate simply for being big.
Use Cases
- Reduce many channels to a few — Sixteen EEG electrodes become three scores that carry most of the movement.
- A cleaner control signal — PC1 of a multi-channel sensor is usually steadier than any single channel.
- See the structure — Plot the Basis as a heatmap: which channels load onto which component.
- 3D from many dimensions — The first three scores into Plot 3D's Scatter or a point cloud.
- Detect a change of regime — When Explained shifts, the shape of the data has changed.
Tips
- Standardize whenever the channels have different units or wildly different scales. Otherwise the biggest unit wins.
- Components are only meaningful while the window's statistics are stable; a very short window gives a jittery basis.
- The sign of a component is arbitrary in principle — here it is stabilised, so treat a sudden flip as a real change.
- Explained falling off slowly means the data genuinely is high-dimensional; do not force it into three.
- For separating mixed sources rather than finding variance directions, ICA is the right tool.
Open PCA in the interactive catalog →
PCA is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.