Skip to main content

spectral_unmix_nnls

Function spectral_unmix_nnls 

Source
pub fn spectral_unmix_nnls(
    y: &[f32],
    endmembers: &[f32],
    n_channels: usize,
    n_components: usize,
) -> Result<UnmixResult, MedicalError>
Expand description

Unmix one observed spectrum y (length n_channels) against endmember matrix endmembers laid out as column-major: component k occupies endmembers[k * n_channels .. (k+1) * n_channels].

n_components columns. Uses multiplicative NNLS-lite updates.