开发者

2D Distribution Region of Interest

开发者 https://www.devze.com 2023-04-03 12:02 出处:网络
Given a 2D distribution. See image: ), How can I find the Region of Interest that contains 90% or开发者_开发技巧 95% of the data in matlab?

Given a 2D distribution. See image:

2D Distribution Region of Interest

),

How can I find the Region of Interest that contains 90% or开发者_开发技巧 95% of the data in matlab?

Many thanks


Use error_ellipse to obtain the required confidence region. All you need to do is give it the covariance matrix (easily obtained with cov(D) where D is matrix where each row is a mean-shifted point)

Sample code:

D = randn(1000,2);
mu = mean(D);
Dm = bsxfun(@minus,D,mu);
error_ellipse(cov(Dm),'conf',0.95,'mu',mu);
hold on;
plot(D(:,1),D(:,2),'r*');

2D Distribution Region of Interest

0

精彩评论

暂无评论...
验证码 换一张
取 消