Rank: 105826 based on 0 downloads (last 30 days) and 0 file submitted
photo

Yashodhan Athavale

E-mail

Personal Profile:
Professional Interests:
Financial Engineering & Forecasting

 

Watch this Author's files

 

Comments and Ratings by Yashodhan View all
Updated File Comments Rating
06 Feb 2013 mRMR Feature Selection (using mutual information computation) This is a cross-platform version of mimimum-redundancy maximum-relevancy feature selection Author: Hanchuan Peng

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,

function [W,M,V] = Init_EM(X,k)
[n,d] = size(X);
[Ci,C] = kmeans(X,k,'Start','cluster', ...
'Maxiter',100, ...
'EmptyAction','drop', ...
'Display','off'); % Ci(nx1) - cluster indeices; C(k,d) - cluster centroid (i.e. mean)
while sum(isnan(C))>0,
[Ci,C] = kmeans(X,k,'Start','cluster', ...
'Maxiter',100, ...
'EmptyAction','drop', ...
'Display','off');
end
M = C';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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;

Please Help....!!! thanks in advance..... :)

Contact us