SK-Ana

Maintained by Saldenisov

Correction Spectra MCR-ALS Extension

Overview

The Correction Spectra extension enables a specialized MCR-ALS model where fixed spectral shapes are refined by paired correction spectra. This is useful when:

Model Structure

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:

Mathematical Model

The decomposition is:

X ≈ [C_fix  C_corr  C_free] × [S_fix^T]
                               [S_corr^T]
                               [S_free^T]

With constraints:

How to Use

Step 1: Load Fixed Spectra

  1. Go to the ALS Constraints → Spectra panel
  2. Upload reference/fixed spectral shapes using “Fix spectral shape(s)”
  3. Select which fixed spectra to include in the model (checkboxes)

Step 2: Enable Correction Spectra

  1. A new panel “Correction Spectra” appears after fixed spectra are loaded
  2. Check “Enable correction spectra”
  3. Options appear:
    • Correction penalty (λ): Controls regularization strength
      • λ = -4: weak penalty, larger corrections allowed
      • λ = -2: moderate (default)
      • λ = 0: strong penalty, very small corrections
    • Zero-mean corrections: Recommended enabled

Step 3: Run ALS

  1. Set total number of dimensions in ”# Spectra” box
    • For example: 2 fixed + 2 corrections + 1 free = 5 dimensions
  2. Run ALS as usual
  3. Output:
    • S_1, S_2: Fixed spectra (unchanged)
    • S_3, S_4: Correction spectra (paired with S_1, S_2)
    • S_5: Free spectrum
    • Kinetics automatically structured accordingly

Interpretation

Example: 2 Fixed Spectra + Corrections

Input:

Output dimensions (k=5):

Physical meaning:

Parameters Explained

Correction Penalty (λ)

Controls how aggressively corrections are shrunk toward zero:

penalty_factor = 1 / (1 + λ × ||S_corr||₂)

Zero-Mean Corrections

If enabled:

S_corr,i ← S_corr,i - mean(S_corr,i)

Why?

Advanced Usage

Interpretation of Correction Magnitude

# In output spectra S_3 vs S_1 (correction vs fixed):
correction_ratio <- max(abs(S_corr)) / max(abs(S_fix))

Comparing Solutions

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).

Troubleshooting

“Correction Spectra” panel doesn’t appear

Corrections are zero or very small

Corrections are too large (> 50% of fixed)

Convergence is slow

Output Files

When you save ALS results with corrections enabled:

Note: C_3 ∝ C_1 and C_4 ∝ C_2 by design.

References


Code Files