Pdf4Mixtures: Calculates pdf for GMM

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Pdf4Mixtures.R

Description

Calculate Gaussianthe probability density function for a Mixture Model

Usage

1
Pdf4Mixtures(Data, Means, SDs, Weights,IsLogDistribution,PlotIt)

Arguments

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

Value

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

Author(s)

Michael Thrun

See Also

PlotMixtures

Examples

1
2
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)

AdaptGauss documentation built on March 26, 2020, 7:57 p.m.