i have done a Random Forest classification on my stack (S1 + S2 images), but in the resulting classification i have some pixel that are not classfified (black ones), not even as “nodata”.
I have already decreased the confidence limit to >= 0.0
Can anyone help me with this issue?
Can you please check the confidence value at these pixels? It is probably -1 (similar thing is reported here)
What happens if you completely remove the Valid Pixel Expression?
Could it be that at these pixels some of your training data don’t have values (or are assigned no-data)?
I’ve checked the confidence, in both confidence and labeledclasses i have NaN as you can see from the screenshot.
I’ve tried to delete completely the Valid pixel Expression, but it has no effects.
In the various bands i have valid pixels in those parts, they looks very dark same like they are not valid, but in spectrum view i get values.
the only explanation I have is that the original raster somehow prevents these pixels to be classified. Can you please go through all input rasters, un-check the “use no data value”, then save the product, and run the classification again?
Ok, i’ve tried to un-check the use no data value option in all raster, but nothing changed.
Anyway i have noticed that the pixels affected by this problem refer to a specific type: dense vegetation.
In my training vectors i fused whole types of vegetations, so it should simply classify them as vegetation, instead it returns NaN value.
I also post my processing graphs both for S1 and S2 images, maybe i made mistakes that lead to this situation and i’m not aware of it. If you want to give a quick check i’d be grateful.
If the NaN pixels are only for a specific class, maybe the training areas for this class are not large enough (or contain too inhomogenous signatures)?
Is this class (and its training areas) somehow different from the others?
I’ve just found the problem is very heavy only in one image, with others i don’t have this problem or at least is present but with very few pixels and not whole parts. Also the classification can assign those pixel in the vegetation class.
The very strange thing is that also the troubled image has valid pixels in those parts in all rasters i used as features.
Is there any hidden settings in Random Forest?
that is strange - but at least you narrowed it down.
Maybe one of the radar indices is faulty only in this stack?
Have you tried increasing the number of trees to be calculated? 10 is standard but you can easily increase it to 100, for example. It takes a longer time but makes more use of the randomization of input features and training pixels.