ohuguy / pmtk3

Automatically exported from code.google.com/p/pmtk3
MIT License
0 stars 0 forks source link

mixGaussFit(data, nmix, varargin) with 'nrandomRestarts',100 #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. x = some_test_data 
2. mixModel = mixGaussFit(x, 2,  'verbose', true, 'maxIter', 
100,'nrandomRestarts',100);

What is the expected output? What do you see instead?
********** Random Restart 2 **********
initializing model for EM
??? Undefined function or variable 'd'.

Error in ==> mixGaussFit>initGauss at 41
    mu              = randn(d, nmix);

Error in ==> mixGaussFit>@(m,X,r)initGauss(m,X,r,initParams,prior) at 24
initFn = @(m, X, r)initGauss(m, X, r, initParams, prior);

Error in ==> emAlgo at 56
model = init(model, data, restartNum);

Error in ==> emAlgo at 38
        [models{i}, llhists{i}] = emAlgo(model, data, init, estep,...

Error in ==> mixGaussFit at 25
[model, loglikHist] = emAlgo(model, data, initFn, @estep, @mstep , ...

What version / revision of the product are you using? On what operating
system?
PMTK (r2774)/Windows (Matlab)

Please provide any additional information below.
Failure in 
function model = initGauss(model, X, restartNum, initParams, prior)
when restartNum ~= 1
mu              = randn(d, nmix);
regularizer     = 2; 
Sigma           = stackedRandpd(d, nmix, regularizer); 
model.mixWeight = normalize(rand(1, nmix) + regularizer); 

We need to define d from model or from data.

Original issue reported on code.google.com by RA.Dragun on 20 Apr 2011 at 12:35

GoogleCodeExporter commented 8 years ago
Moved to GitHub: https://github.com/probml/pmtk3/issues/25

Original comment by irosen on 4 Jan 2014 at 2:34