Combine two or more gaussian components into one Gaussian Mixture (gmdistribution)

39 ビュー (過去 30 日間)
micholeodon
micholeodon 2020 年 2 月 10 日
コメント済み: micholeodon 2020 年 2 月 10 日
Hello,
Is there any way to combine two (or more) separate Gaussian Components into one?
clear; close all; clc;
N = 25; % N-points
D = 2; % D-dimensions
% generate data
X = randn(N,D);
Y = randn(N,D)+2; % +2 to spatially separate data components
% model gaussian components
muX = mean(X,1)
SX = cov(X)
muY = mean(Y,1)
SY = cov(Y)
GX = gmdistribution(muX,SX,1) % first component
GY = gmdistribution(muY,SY,1) % second component
% COMBINE !
GC = ???????????????(GX,GY);
I would like to get output like this:
GC =
Gaussian mixture distribution with 2 components in 2 dimensions
Component 1:
Mixing proportion: 0.500000
Mean: -0.0017 -0.1167
Component 2:
Mixing proportion: 0.500000
Mean: -0.0037 0.1367

採用された回答

Adam
Adam 2020 年 2 月 10 日
編集済み: Adam 2020 年 2 月 10 日
Doesn't
GC = gmdistribution( [muX; muY], cat( 3, SX, SY ), [1; 1] );
work?
  1 件のコメント
micholeodon
micholeodon 2020 年 2 月 10 日
Yes ! That's it !
Thank you very much :)

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by