I am going to perform an unsupervised classification on my dataset and will get a map as a result. The objective is to rebuild an already existing map (of different soil types) with my new dataset. Unfortunately I don't have any underlying data information to the existing map - just the polygon features and their different classes.

My problem is: How can I validate which unsupervised classification result has a better correlation with the existing map?

The main issue will be in comparing the spatial patterns of the polygons and thereby derive which classification result represents the existing map better. (I don't want to make just a visual comparison, but an analytic- mathematical one.)

My dataset from where I will perfom the unsupervised classification is raster based. The other (already existing) map consists of polygons (in shapefiles) with nothing more than the information of which type of class has been assigned.

I'd be happy if you could help me out with a proper methodology or process. (I am working either in R, QGIS and ARCGis).

After some research I came across a very promissing statistical approach: the Rand index. In R there are various implementations (package mclust & flexclust) - I will work them through in the next days and hopefully can deliver more information on the topic in a while.

  • Is your dataset raster-based? If I understand right, you have polygons outlying soil types and a few raster images that you will use for classification. Then you want to compare the unsupervised results with the polygon values. Is that right?
    – yellowcap
    Commented Feb 3, 2015 at 10:37
  • 1
    Yes that is right. My dataset fromwhere I will perfom the unsupervised classification is rasterbased. The other already existing map consists of polygons(shapefiles...) with nothing more than the information of which type of class has been asigned.
    – kaltfront
    Commented Feb 3, 2015 at 10:51
  • Is your unsupervised classification already labelled or not ? In other word, are you comparing two classification with the same classes or are you comparing a classification with a lot of clusters without a class
    – radouxju
    Commented Jun 19, 2016 at 18:05

1 Answer 1


I dont have a very concrete answer for you, but here are some considerations that might help. I guess you have two separate problems here

First you need to match the unsupervised classification values to the existing values. This also relates on how many classes your unsupervised classification will create. I think that for some classification algorithms you can specify that, and I would recommend you fix the number of classes in the classifier to the number of classes in the shapefile.

But even with the same number of classes, it is not obvious how you would match the values, as they are not going to be the same (i.e. value 1 in the classification might not be soil category 1).

After matching the classes, the second task would be to figure out the quality of the classification. Here you could rasterize your shapefile (convert it to raster) and then make a pixel-by-pixel comparison and compute a confusion matrix. There is a lot of scientific literature on assessing the quality of a classification.

You could kind of do both of those steps in one by computing zonal statistics of the classified raster, and looking at mean and variance to see if the pixels within one polygon are constant and match the expected class.

Overall, I am not sure why you want to do unsupervised classification though. If you have target soil data in polygons, you could rasterize those and do supervised classification instead, which would solve the first problem described above.

Your Answer

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

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