I am trying to use the fitgmdist function from the statistics package in Octave. It works when I let it use the default k++ method for finding initial parameters. However, the results are not consistent and sometimes just plane wrong. That is why I wanted to be able to pass initial values for the means based on looking at the histograms. But for some reason the function won't accept them. The error I keep ending up with is the following:
error: fitgmdist: invalid start parameter
error: called from
fitgmdist at line 202 column 9
curve_fitting at line 78 column 17
curve_fitting is just the name of my script. I am trying to use the following code for the function:
nbOrientations = 2;
initial_orientations = [38.0; 18.0]; % #values here should match nbOrientations
initial_weights = ones(1,nbOrientations)/nbOrientations;
initial_Sigma = ones(1,1,nbOrientations);
start = struct('mu',initial_orientations,'Sigma',initial_Sigma,'ComponentProportion',initial_weights)
GMModel_Theta = fitgmdist(Angle_Theta, nbOrientations,'Start', start,'RegularizationValue',0.0001)
My data is just a 700ish by 1 array.
I checked my struct and it seems to me that it satisfies the requirements I could find in the matlab/octave documentation. I am all out of ideas on how to fix this. Hopefully someone can point me in the right direction.
EDIT: I managed to test my script in matlab on someone else's computer and there is just worked. It seems to me that this is an issue with Octave.