pmtk3
pmtk3 copied to clipboard
mixGaussFit(data, nmix, varargin) with 'nrandomRestarts',100
From RA.Dragun on April 20, 2011 08:35:22
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: http://code.google.com/p/pmtk3/issues/detail?id=25