-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Parent Epic
Part of #172 (2D Resonance Imaging)
Description
Implement Non-negative Matrix Factorization (NMF) for denoising hyperspectral data.
Approach
NMF decomposes the data matrix X ≈ W × H where:
- X: (n_pixels × n_energies) data matrix
- W: (n_pixels × k) abundance matrix
- H: (k × n_energies) spectral components
This exploits:
- Spectral correlations across pixels
- Non-negativity constraints (physical)
- Low-rank structure (few isotopes)
Proposed Interface
class NMFDenoising:
"""NMF-based spectral denoising."""
def __init__(
self,
n_components: int | None = None, # Auto-detect if None
max_iter: int = 200,
tol: float = 1e-4,
):
...
def fit(self, data: np.ndarray) -> "NMFDenoising":
"""Fit NMF model to hyperspectral data."""
# data shape: (n_pixels, n_energies)
...
def denoise(self, data: np.ndarray) -> np.ndarray:
"""Denoise data using fitted model."""
...
def get_components(self) -> np.ndarray:
"""Return learned spectral components."""
...Research Questions
- How to choose number of components?
- How does NMF affect resonance peak shapes?
- What's the impact on fitting accuracy?
- How to handle pixels with very few counts?
Tasks
- Implement NMF denoising class
- Test on synthetic data with known noise
- Evaluate impact on fitting accuracy
- Compare to spatial binning baseline
- Document method and best practices
References
- scikit-learn NMF implementation
- NMF for hyperspectral imaging literature
Assignees
Jean (LANL)