3

I have to carry out a Principal Component Analysis (sklearn.decomposition.PCA) on a dataset composed of several images. Some of these images have very large gaps due to the removal of clouds.

Is there the possibility to apply a mask to all the NoData values for each layer so as the algorithm does not take them into consideration, and consider only the valid values of other underlying/overlying layers (which do not have NoData in that position)? So to have final PCs without gaps.

I'm not sure if my request is clear, I try to give an example: I have a dataset consisting of 4 layers. In the pixel in position (x = 27; y = 32) the different 4 layers have: Layer-1 = value; Layer-2 = value; Layer-3 = NoData; Layer-4 = value. I need that the alghoritm takes into consideration the Layers-1,2,4 and discard the Layer-3 to build the PCs values of only that pixel.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.