DATASET PCA (FIT)¶
Fits PCA on a set of numeric dataset columns – selected by a column name prefix (e.g. ‘MEAS_ENGSS_YY_’), an explicit list, or BOTH combined (the union) so columns from different patterns can be decomposed together. Appends the principal-component scores as new columns (‘<pc_prefix>_PC1’..’_PCn’) and emits the fitted projection (components/mean/std/columns) as a reusable parameters object. Standardizes over available values only; missing values handled by the chosen strategy (‘zero’ = fill with training mean; ‘iterative’ = iterative SVD imputation). SVD via numpy. Use on the TRAINING dataset, then feed ‘pca_parameters’ into dataset_pca_transform and dataset_pca_inverse.
When to use¶
Tagged: pca, dimensionality_reduction, svd, fit, decomposition, preprocessing, curves, iterative_svd.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Dataset | dataset | dataset | — | ✓ | Training dataset with the curve columns to decompose; array-of-row-objects. |
| Column Prefix | column_prefix | text | — | Prefix selecting numeric columns to decompose, e.g. ‘MEAS_ENGSS_YY_’. Columns whose remainder after the prefix is an integer are used, sorted numerically. Can be combined WITH the explicit Columns list (the union is decomposed). | |
| Columns | columns | text | — | Explicit list of additional columns to decompose, e.g. MEAS_ENGSS_xfirst, MEAS_ENGSS_xlast. Combined with Column Prefix (union) – use this to add columns that don’t share the prefix pattern. | |
| PC Column Prefix | pc_prefix | text | PC | Prefix for the emitted score columns, e.g. ‘EngSS’ -> EngSS_PC1, EngSS_PC2, … Must match what dataset_pca_inverse expects. | |
| Number of Components | n_components | number | 10 | Number of principal components to keep (clamped to the achievable rank). | |
| Missing Value Strategy | missing_strategy | select | zero | How to handle missing values when fitting. ‘zero’: missing standardized values filled with 0 (the training mean), single SVD. ‘iterative’: iterative SVD imputation (re-impute missing cells from a low-rank estimate, repeat) with per-row least-squares scores – better when columns are heavily missing (e.g. curves with shorter x-ranges). |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| Dataset With PCs | dataset | dataset | Input dataset with appended <pc_prefix>_PC1..n score columns. |
| PCA Parameters | pca_parameters | json | Fitted projection: columns, mean, std, components, pc_prefix, missing_strategy, explained_variance_ratio. Reuse with dataset_pca_transform / dataset_pca_inverse. |
| Status | status | string | Summary of columns decomposed and components kept. |
Disciplines¶
- data.dataset.transform
- data.statistics
Auto-generated from platform schema. Worker id: dataset_pca_fit. Schema hash: 7c83511128c3. Hand-curated docs in workerexamples/ override this page when present.