gaussianMle
MLE (maximum likelihood estimator) for Gaussian PDF
Contents
Syntax
- gPrm = mleGaussian(data)
- gPrm = gaussianMle(data, type)
- gPrm = gaussianMle(data, type, showPlot)
Description
gPrm = gaussianMle(data, type) returns the optimum parameters for Gaussian PDF via MLE
- data: data matrix where each column corresponds to a vector of observation
- type: type of covariance matrix
- 'full' for full covariance matrix
- 'diagonal' for diagonal covariance matrix
- 'single' for a covariance matrix of a constant times an identity matrix
- gPrm: Parameters for Gaussian PDF
- gPrm.mu: MLE of the mean
- gPrm.sigma: MLE of the covariance matrix
Example
1D example
dataNum=1000; x = randn(dataNum, 1); showPlot=1; gPrm=gaussianMle(x, [], showPlot);

2D example
ds=dcData(7); figure; gPrm=gaussianMle(ds.input, 'full', showPlot); figure; gPrm=gaussianMle(ds.input, 'diagonal', showPlot); figure; gPrm=gaussianMle(ds.input, 'single', showPlot);


