how to generate a 2D data set for PCA

Generate a data set X of samples from a two-dimensional Gaussian with mean vector μ and covariance matrix C for different choices of μ and C and numbers of samples (in the range of about 100-2000)

回答 (1 件)

Image Analyst
Image Analyst 2017 年 2 月 8 日

0 投票

Hint (example in the help for pdf()):
mu = [1 2;-3 -5];
sigma = cat(3,[2 0;0 .5],[1 0;0 1]);
p = ones(1,2)/2;
obj = gmdistribution(mu,sigma,p);
ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])

カテゴリ

ヘルプ センター および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

タグ

質問済み:

2017 年 2 月 8 日

回答済み:

2017 年 2 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by