I'm using this algorithm for the first time, and unable to relate the articles published and the code written. As indicated in the function [fea] = mrmr_miq_d(d, f, K):

I did the following:
d= 180 x 48 dataset - indicating 180 samples each having 48 features
f = 180 x 1 - class/category of the n samples
K = 24 - number of features to be selected

I ran the code and got the [fea] as output vector of 1 x 24 dimensions. But what does [fea] mean ? What do the numbers in the fea array signify ?

17 Jun 2012

EM_GM
An expectation maximization algorithm for learning a multi-dimensional Gaussian mixture.
Author: Patrick Tsui

Hello,

I think the error is popping up because you are processing X with dimensions 4601*57. I would suggest try taking the transpose of X, which might solve the problem.

Let me know if it works.
Regards

25 Jan 2010

EM_GM
An expectation maximization algorithm for learning a multi-dimensional Gaussian mixture.
Author: Patrick Tsui

I tried modifying the code a little bit, by including the following lines of code,

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use this routine if the cluster matrix is of variable length and contains
% Scan the cluster index matrix Ci for NaN values, and remove them
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
temp1=Ci(:,1); % Scan the entire matrix column
temp2=isnan(temp1); % Find the rows with NaN values
index_active=find(temp2~=1); % Find the rows with actual values
Ci_new=temp1(index_active); %#ok<FNDSB>
[r,c]=size(Ci_new); % Determine the size of the newly scanned matrix.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Vp = repmat(struct('count',0,'X',zeros(r,c)),1,k);
for i=1:r % Separate cluster points
Vp(Ci_new(i)).count = Vp(Ci_new(i)).count + 1;
Vp(Ci_new(i)).X(Vp(Ci_new(i)).count,:) = X(i,:);
end

V = zeros(d,d,k);
for i=1:k,
W (i) = Vp(i).count/r;
% Find the covariance ignoring the NaNs
V(:,:,i) = nancov(Vp(i).X(1:Vp(i).count,:));
end
%%%%%%%%%%%%%%%%%%%%%%%%
%%%% End of Init_EM %%%%
%%%%%%%%%%%%%%%%%%%%%%%%

I worked, giving me the estimates. But still I am getting some warnings with "Empty rows of data".

07 Jul 2009

EM_GM
An expectation maximization algorithm for learning a multi-dimensional Gaussian mixture.
Author: Patrick Tsui

I have a multidimensional file in Microsoft Excel. I imported the sheet into X, and executed [W,M,V,L] = EM_GM(X,3,[],[],1,[]);

I am getting the following errors,

[W,M,V,L] = EM_GM(X,1,[],[],1,[])
Warning: Ignoring rows of X with missing data.
> In kmeans at 127
In EM_GM>Init_EM at 261
In EM_GM at 74
??? Attempted to access C(1,2); index out of bounds because numel(C)=1.

Error in ==> kmeans>distfun at 722
D(:,i) = D(:,i) + (X(:,j) - C(i,j)).^2;

Error in ==> kmeans at 329
D = distfun(X, C, distance, 0);

Error in ==> EM_GM>Init_EM at 261
[Ci,C] = kmeans(X,k,'Start','cluster', ...

Error in ==> EM_GM at 74
[W,M,V] = Init_EM(X,k); L = 0;

Good code!!! It works very well.
However, I found a bug. In Matlab R2013
for k=5:15
[W,M,V,L] = EM_GM(Data',k,0.001,1000,1,[]);
end
For certain k, it came out with error:
Attempted to access maxy(1); index out of bounds because numel(maxy)=0.
I noticed that some value in M were set as Nan.
However, for the same data in Matlab 7.1 it works perfectly fine.

Comment only

28 Mar 2014

EM_GM
An expectation maximization algorithm for learning a multi-dimensional Gaussian mixture.

I also got the ESTPAB problem. When I tried running makeosmex to recompile mex files I got the error below.
>>
xcodebuild: error: SDK "macosx10.7" cannot be located.
xcrun: error: unable to find utility "clang++", not a developer tool or in PATH
mex: compile of ' "estcondentropy.cpp"' failed.
Unable to complete successfully.
Error in makeosmex (line 25)
mex(list(i).name);
<<
None of the solutions on this board worked for me (e.g. changing log(2) to log(2.0) or to log(double(2)), etc.
The problem turned out to be that I have Xcode 5.0 and Mac OS10.8, which apparently does not work out-of-the-box. The solution suggested by the Mathworks support team worked for me:
http://www.mathworks.com/matlabcentral/answers/103904
After that, makeosmex compiled for me and I was able to run demo_mi.
Other than that this package looks good.

5

24 Jan 2014

Mutual Information computation
A self-contained package for computing mutual information, joint/conditional probability, entropy

Comment only