How to test the difference between 2 groups of 2D matrix?

5 次查看(过去 30 天)
Hi there, I have 2 groups of 2D matrix, which stand for two groups of points in 2D coordinate,i.e.
group1:[x1,y1],[x2,y2],[x3,y3]...
group2:[x'1,y'1],[x'2,y'2],[x'3,y'3]...
I want to test whether these two groups of data have a significant difference, could anyone tell me which method I should choose, thanks a lot!

回答(2 个)

Star Strider
Star Strider 2016-7-23
If you have R2015a or later, the ismembertol function would be my choice, because if your values are floating-point, you will need to include a tolerance value.
If you are talking about a statistical significance between them, and your know they are normally distributed, one of the t-test functions would likely work.
If you want to use non-parametric statistics, the Wilcoxon ranksum or signrank tests would likely be best.
All the statistical tests are in the Statistics and Machine Learning Toolbox.
  6 个评论

请先登录,再进行评论。


Image Analyst
Image Analyst 2016-7-23
编辑:Image Analyst 2016-7-23
It would help if we had more context. For example, if they are two closed contours - perimeters around some shapes - and you want to see how well they compare, some people look at the non-overlapped area, and sometimes normalize it to the area of one of the blobs or the average of the two areas. So you could use poly2mask() to turn them into masks and count the non-overlapped pixels
mask1 = poly2mask(x1, y1, rows, columns);
mask2 = poly2mask(x2, y2, rows, columns);
nonOverlappedPixels = xor(mask1, mask2);
numNonOverlappedPixels = sum(nonOverlappedPixels(:));
percentMisMatch = 100 * numNonOverlappedPixels / mean([sum(mask1(:)), sum(mask2(:))]);
  3 个评论
Image Analyst
Image Analyst 2016-7-24
Try the "Classification Learner" app on the Apps tab of the tool ribbon. From there you can try a bunch of different classification methods such as kmeans, SVM, Bayesian, etc. Try several of them with a wide range of your data and see which one works the best.
Weiqian Jiang
Weiqian Jiang 2016-7-24
Sorry but I cannot find the tool ribbon in this website, could you please tell me where I can find this "classification learner"?

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by