1
votes

I am classifying and satellite images using random forest classification algorithm in Python. I want to map the uncertainty of classification for each class at pixel level.

Is it possible?

So far I have searched on internet and found this link https://www.sciencedirect.com/science/article/pii/S0303243412001195 but method mentioned here to calculate uncertainty is only for binary classification.

I will really appreciate any guidance in this regard.

1

1 Answers

1
votes

Based on the publication you mentionned:

The classification uncertainty of a pixel u is characterized by the probability vector (pu) obtained by the probabilistic classifier. This vector contains the probability p(i) of being classified into class i (pu = (p(1), p(2), …, p(c)), with c the total number of land cover classes

I would suggest to use the predict_proba function of sklearn.ensemble.RandomForestClassifier, which returns an array of shape (n_samples, n_classes) with the mentionned probabilities.

Hope it helps.