powered by
Calculate Gaussianthe probability density function for a Mixture Model
Pdf4Mixtures(Data, Means, SDs, Weights,IsLogDistribution,PlotIt)
List with
matrix, where the columns are the gaussians
matrix, where the columns are the gaussians weighted by Weights
linear superpositions of PDF - prior probabilities of Gaussians
vector (1:N) of data points
vector[1:L] of Means of Gaussians (of GMM),L == Number of Gaussians
vector of standard deviations, estimated Gaussian Kernels, has to be the same length as Means
vector of relative number of points in Gaussians (prior probabilities), has to be the same length as Means
Optional, ==1 if distribution(i) is a LogNormal, default vector of zeros of length 1:L
Optional: =TRUE plot of pdf
Michael Thrun
PlotMixtures
data=c(rnorm(1000),rnorm(2000)+2,rnorm(1000)*2-1) Pdf4Mixtures(data,c(-1,0,2),c(2,1,1),c(0.25,0.25,0.5), PlotIt=TRUE)
Run the code above in your browser using DataLab