Skip to content

PCA and MCR with 3D spectrum data #756

Answered by atravert
liuchzzyy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @liuchzzyy ,

MCR-ALS is intrinsically a 2-dimensional method, so to apply it to hyperspectral data (shape =n_x, n_y, n_wavenumbers) you have to:

1/ unfold the hyperspectral data in a 2-dimensional NDDataset D of the spectra (shape = n_x*n_y, n_wavenumbers). You can either keep the spatial informations as coordinates in the NDDataset, or separately

2/ carry out the MCR-ALS, that will yield the C (shape = nx*n_y, n_species) and St (shape = n_species, n_wavenumbers) matrices

3/ if needed, reshape the C matrix to (n_x, n_y, n_species)

The same, I think, holds for PCA.

Does this answer your question ?

Best regards
Arnaud

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by liuchzzyy
Comment options

You must be logged in to vote
1 reply
@atravert
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants