Consider the follow model of three mixtures:
\[f(x) = 0.3\phi (x, - 3,1) + 0.3\phi (x,0,1) + 0.4\phi (x,2,0.5)\]
The data generated from the model is shown as a histogram and distribution plot below.
The following matlab code analyzes the data and gives out the calculated mixtures.
maxterms = 10;
[pihat,muhat,varhat]=csadpmix(data,maxterms);
We can see the result mixtures by:
figure;
csdfplot(muhat,varhat,pihat,min(data),max(data));
axis tight;
It is clear from the above figure that the generated mixtures has 9 terms!. This is normal for adaptive mixtures procedure. The distribution of these mixtures is shown below (it should be similar to the distribution of the original).
No comments:
Post a Comment