modifying pdf of a GMM using gmdistribution
Show older comments
I have made a GMM using gmdistribution.fit on a dataset and now I'd like to alter the PDF by making the highs higher and the lows lower, for example by squaring or cubing the individual pdf values and then renormalizing so it sums to 1. The point is to emphasize the peaks of the distribution even more when sampling from the gmm. How can I transform the gmm in this way? Thanks!
Gene
2 Comments
Eugene Kogan
on 17 Feb 2011
Umar
on 19 Jul 2024
Hi Eugene,
First, load your dataset and fit a GMM using the fitgmdist function. Calculate the PDF values of the GMM using the pdf function.Apply a transformation to the PDF values (e.g., squaring or cubing) to emphasize peaks.Renormalize the transformed PDF values by dividing by the sum of the transformed values to ensure the distribution sums. Now, visualize the original and modified PDF on a plot to compare the effects of the transformation on the distribution. Hope this will help you resolve your problem now.
Answers (1)
Anshuman
on 3 Sep 2024
0 votes
Hello,
To achive this, firstly evaluate the PDF of the GMM at a set of points. You can use the 'pdf' method available for a GMM object. Apply the transformation you desire, such as squaring or cubing the PDF values, to emphasize the peaks. After modifying the PDF values, you need to renormalize them so that they sum to 1. This involves dividing each modified value by the sum of all modified values. Now, use the modified PDF to sample from the distribution.
Hope it helps!
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!