Maintained by Saldenisov
The Correction Spectra extension enables a specialized MCR-ALS model where fixed spectral shapes are refined by paired correction spectra. This is useful when:
With k = 2n + a components:
| Spectra Set | Count | Role | Constraints |
|---|---|---|---|
| Fixed (S_fix) | n | Known/reference shapes | Hard-constrained, normalized to 1 |
| Corrections (S_corr) | n | Deviations from fixed | Orthogonal to S_fix, zero-mean, small |
| Free (S_free) | a | Additional components | Standard ALS (nonnegative, etc.) |
Concentrations:
The decomposition is:
X ≈ [C_fix C_corr C_free] × [S_fix^T]
[S_corr^T]
[S_free^T]
With constraints:
| Regularization: min | S_corr | ² (Tikhonov) |
Input:
Output dimensions (k=5):
Physical meaning:
Controls how aggressively corrections are shrunk toward zero:
penalty_factor = 1 / (1 + λ × ||S_corr||₂)
If enabled:
S_corr,i ← S_corr,i - mean(S_corr,i)
Why?
# In output spectra S_3 vs S_1 (correction vs fixed):
correction_ratio <- max(abs(S_corr)) / max(abs(S_fix))
Standard ALS (k=3):
X ≈ C_1 S_1^T + C_2 S_2^T + C_3 S_3^T
Result: 3 unknown spectra
Coupled Correction ALS (k=3 with 1 fixed):
X ≈ C_fix S_fix^T + C_corr S_corr^T + C_free S_free^T
Result: 1 known, 1 correction, 1 free
Advantage: Interpretability (fixed component is constrained to known shape).
When you save ALS results with corrections enabled:
Note: C_3 ∝ C_1 and C_4 ∝ C_2 by design.
server_files/ALS_CorrectionSpectra.R – Core functions (getC_Coupled, getS_Coupled, myals_Coupled, als_Coupled)ui_files/ALSInputConstraintsCorrectionSpectra.R – UI panelserver_files/ALS_CorrectionSpectra_Server.R – Integration logic with main ALS