why change in mean and covariance doesnot effect gmdistribution
Show older comments
Hello,
Below I have given 5 points. In each point mu, sigma and mixp is given. Gmdistribution is calculated for each . Changing of mu and sigma values do not make any change in the answer. But if I change the mixp values then the distribution value changes. Why does the change in mean and sigma doesnot affect the gmdistribution?
1. mu = [1 2;-3 -5]; Sigma = [2 0; 0 .5],[1 0; 0 1]; mixp = ones(1,2)/2; gm = gmdistribution(mu,Sigma,mixp) ans= Sigma = 2.0000 0 0 0.5000 gm = Gaussian mixture distribution with 2 components in 2 dimensions Component 1: Mixing proportion: 0.500000 Mean: 1 2
Component 2: Mixing proportion: 0.500000 Mean: -3 -5
2. I have changed the value of mixp
mu = [1 2;-3 -5]; Sigma = [2 0; 0 .5],[1 0; 0 1]; mixp = ones(1,2); gm = gmdistribution(mu,Sigma,mixp) ans= Sigma = 2.0000 0 0 0.5000 gm = Gaussian mixture distribution with 2 components in 2 dimensions Component 1: Mixing proportion: 0.500000 Mean: 1 2
Component 2: Mixing proportion: 0.500000 Mean: -3 -5
3. I have changed the value of mixp again
mu = [1 2;-3 -5]; Sigma = [2 0; 0 .5],[1 0; 0 1]; mixp = [3 4]; gm = gmdistribution(mu,Sigma,mixp) ans= Sigma = 2.0000 0 0 0.5000 gm = Gaussian mixture distribution with 2 components in 2 dimensions Component 1: Mixing proportion: 0.428571 Mean: 1 2
Component 2: Mixing proportion: 0.571429 Mean: -3 -5
4. I have changed the value of sigma. The mixing proportion remains the same as above.
mu = [1 2;-3 -5]; Sigma = [8 0; 0 .5],[1 0; 0 1]; mixp = [3 4]; gm = gmdistribution(mu,Sigma,mixp) Sigma = 8.0000 0 0 0.5000 gm = Gaussian mixture distribution with 2 components in 2 dimensions Component 1: Mixing proportion: 0.428571 Mean: 1 2
Component 2: Mixing proportion: 0.571429 Mean: -3 -5 5. I have changed the value of mean but the mixing proportion doesnot change.
mu = [7 2;-3 -5]; Sigma = [8 0; 0 .5],[1 0; 0 1]; mixp = [3 4]; gm = gmdistribution(mu,Sigma,mixp)
Sigma =
8.0000 0
0 0.5000
gm =
Gaussian mixture distribution with 2 components in 2 dimensions Component 1: Mixing proportion: 0.428571 Mean: 7 2
Component 2: Mixing proportion: 0.571429 Mean: -3 -5
Thanks,
Nidhi
Accepted Answer
More Answers (1)
Nidhi
on 26 Jun 2012
0 votes
6 Comments
Tom Lane
on 26 Jun 2012
In the code " g = gmdistribution(green_mean, green_std, green)" you are creating a gaussian mixture distribution with mean green_mean, variance (not standard deviation) green_std, and mixing proportion green. This would not work if green=0, for instance. Also, it looks like green is a scalar rather than a vector of proportions. Can you explain what you would like the command to do? Then maybe I can suggest something.
Nidhi
on 27 Jun 2012
Tom Lane
on 27 Jun 2012
You write "In the algo they say calculate gaussian probability density function." If you intend to calculate three separate normal densities, you probably want either to use normpdf three times, or use gmdistribution.pdf once. You would use gmdistribution only if you wanted to create a single distribution that is a specified mixture of multiple normal distributions.
Nidhi
on 30 Jun 2012
Tom Lane
on 30 Jun 2012
The gaussian_probability function isn't a Statistics Toolbox function. At just a quick look, it appears to be something like normpdf but with arguments in a different order. My guess is normpdf(x,mu,sigma) is like gaussian_probability(mu,sigma,x). But that's a guess. Maybe you could try writing to the author.
Nidhi
on 2 Jul 2012
Categories
Find more on Gaussian Mixture Models 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!