Model Wavelet coefficients using Gaussian Mixtures

2 visualizaciones (últimos 30 días)
A. P. B.
A. P. B. el 4 de En. de 2018
I tried to model the 'coefficient distribution of the wavelet using Gaussian Mixtures. I have attached the wavelet I am trying to model with this.
I have written this piece of code to model the data. However it doesnt model the coefficient distribution which is most probably the histogram of the distribution. How can I modify the code to model the distribution of wavelet coefficients
X = mat_cell;num_dim=2;num_clus = 2; % number of mixtures/clusters
[counts,binLocations] = imhist(X);
stem(binLocations, counts, 'MarkerSize', 1 );
xlim([-1 1]);
% inital kmeans step used to initialize EM
rng('default');
data=reshape(X,[],num_dim);
[kmeanscid,cInd.mu] = kmeans(data, num_clus,'MaxIter', 75536);
data_k_1=data(kmeanscid==1);
data_k_2=data(kmeanscid==2);
a = diag(cov(data_k_1'));
b=diag(cov(data_k_2'));
if a==0
a=0.1;
elseif b==0
b=0.1;
end
initialsigma = cat(3,[a,a],[b,b]);
%disp(initialsigma);
cInd.Sigma=initialsigma;
% fit a GMM model
options = statset('MaxIter', 75536);
gmm = fitgmdist(data, num_clus,'Start',cInd,'CovarianceType','diagonal','Regularize',1e-5,'Options',options);

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by