0

Is there a correlation between the time that supervised classification takes to execute and the training areas that we choose?

Perhaps if we take larger areas for classification will the classification take more time, or if we take multiple small urban areas instead of a big one will it take less time.

Because I am trying to classify a MODIS Image with knn and it takes about 30-40 seconds and I don't know if my training areas are too big or if I should change to multiple small training areas and I don't really know where to look for to get a straight answer.

  • 1
    It could depend on software used. Have you tested both approaches? – aldo_tapia May 24 '18 at 16:36
  • Yeah but results had about 10 seconds difference. Also, to be honest, I haven't tried to do it to the extreme because I wanted to ask someone with more experience beforehand. – George Nostradamos May 24 '18 at 16:44
  • I think is an area-related issue. Maybe, the total sample size is bigger in the first case – aldo_tapia May 24 '18 at 16:50
  • 1
    Rather than the area of training, its the number of training data that is important here. KNN could typically be described as a 'fast' algorithm, but the more features and variables you use the more axes (and further along them) the KNN has to search in the feature space – Nathan Thomas May 24 '18 at 21:08
  • @NathanThomas So in theory, it would go faster if I have, let's say 3 big training areas for 3 classes rather than 100 small for 4 classes? – George Nostradamos May 24 '18 at 21:45
1

To provide a complete answer from my comments:

As I understand, whichever one provides you the greatest number of training samples will take the longest to run. If each training area is represented by a single value then 'area' is largely irrelevant. However, if each pixel within an area is used (likely in your case), then this provides many more training samples that have to be ingested. In this case, whichever method provides the least number of training samples will be faster. How many pixels are used for training in both methods?

A larger influence is the value of k and the number of variables (image bands in this case). The number of variables used will determine the number of axes in the n dimensional feature space and the value of k will effectively determine how far along each of the axes will need to be searched.

The total number of pixels/objects to be classified will also determine algorithm speed but this will largely be the same in both instances.

  • By now I have tried your case and yes it is faster with less samples BUT I tried bigger areas with a greater aggregation factor which gave me even faster results that turned out to be wrong, like land being classified as sea wrong. So, yes that is correct but I suppose that I need more experiments to determine the shapes and the training areas. So is there any book or a paper that you can recommend on that? – George Nostradamos May 25 '18 at 15:02
  • I don't have a reference for something that is that specific. Im not sure if its something that has been looked into at all - most of this could probably be 'worked out' from an understanding of the mathematics of the algorithm. For a thorough overview, try Mitchell, T. M., 1997. Machine learning. WCB. McGraw-Hill Boston, MA. – Nathan Thomas May 25 '18 at 20:34
  • My mistake on that one. I wanted to say if you can recommend a a textbook or a paper where I can see a correct test area for supervised classification (using either knn, random forests or whatever) on a modis image or a sentinel image – George Nostradamos May 25 '18 at 21:50
  • Perhaps test area is the wrong way of looking at it. Really, what you want to do is get an accurate statistical representation of each class, regardless of the area that this takes. The author Giles foody has done a lot of work in this area – Nathan Thomas May 25 '18 at 23:42

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.