0

In my previous question (memoryerror in Supervised Random Forest Classification in Python sklearn) encounter further issue on random forest classification output. The python code runs fine, but the output is noise or invalid classification. I used randomly generated points and collected pixels from Maximum Likelihood Classification from ArcGIS 10.3 which was used as training dataset. The training dataset contains 1500 labels of land use-land cover. I am assuming it could be because point dataset may not contain enough pixels to represent each land-use, but i can't be sure.

Can you explain why the classification output is noise?

EDIT: The apparent noise output was due to switched row, col at the last sections of the code.

  • 1
    it is hard to tell if this is a problem with the algorithm/data, or a data management issue. Did you use a test data set, if so what were the accuracy metrics? – lpd2 Aug 17 '17 at 14:53
  • @lpdudley The Out-Of-Bag accuracy was about 83%. I did not use test dataset. Apparently from the output, the classification is not correct. I don't know what possible reasons except the point dataset not being representing each landuse. – Kaleab Aug 17 '17 at 18:34
2

You stated:

I used randomly generated points and collected pixels from Maximum Likelihood Classification from ArcGIS 10.3 which was used as training dataset.

I suspect creating training data by sampling the output from a maximum likelihood land cover classification is the source of the noise and error. This approach is not recommended. Fewer, high quality training data is much preferred over lots of poor training data.

A better approach would be to create high quality training data using either of the following approaches:

  1. Collect on-the-ground training data and have a balanced sampling design (e.g. equal numbers of training points per class).
  2. Expertly select pixels on-screen that represent the correct land cover classes--also using a balanced sampling design.
  • Why is the prediction accuracy 83%? My references (where the actual code is taken from) used, like you suggested, polygon training data.But how can i know the sampling design is balanced? Use equal number of polygons? – Kaleab Aug 18 '17 at 6:12
  • I suspect the model is overfit. I'm still confused why you are incorporating ML data into your random forest model. – Aaron Aug 18 '17 at 8:25
  • While I could do a tedious digitizing of region of interest (ROI), I thought may be I could use ML Classification as training data, afterall the ML classified image was reasonable. Is there any automated way to base the training dataset? – Kaleab Aug 18 '17 at 8:56
  • May be I could test if the model overfit by using 1/4th of all samples (3/4th training,1/4th test)? How would i know (any metrics) if the model overfit? – Kaleab Aug 18 '17 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.