Pdf4Mixtures {AdaptGauss} | R Documentation |
Calculate Gaussianthe probability density function for a Mixture Model
Pdf4Mixtures(Data, Means, SDs, Weights,IsLogDistribution,PlotIt)
Data |
vector (1:N) of data points |
Means |
vector[1:L] of Means of Gaussians (of GMM),L == Number of Gaussians |
SDs |
vector of standard deviations, estimated Gaussian Kernels, has to be the same length as Means |
Weights |
vector of relative number of points in Gaussians (prior probabilities), has to be the same length as Means |
IsLogDistribution |
Optional, ==1 if distribution(i) is a LogNormal, default vector of zeros of length 1:L |
PlotIt |
Optional: =TRUE plot of pdf |
List with
PDF4modes |
matrix, where the columns are the gaussians |
PDF |
matrix, where the columns are the gaussians weighted by Weights |
PDFmixture |
linear superpositions of PDF - prior probabilities of Gaussians |
Michael Thrun
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)