Code covered by the BSD License  

Highlights from
Estimating the number of clusters via System Evolution

from Estimating the number of clusters via System Evolution by Kaijun Wang
estimate number of clusters for far clusters, small-larger clusters, slightly overlapping clusters

data_load(id,sw,nk,N2,type)
function [data, N1, N, Ns, truelabels, dc] = data_load(id,sw,nk,N2,type)

data = load(sw);
[nrow, dim] = size(data);
N1=2; 
N = max([N2,nk+6]);     % searching limit at k = N
Ns = N1:N;
truelabels = ones(nrow,1);
if id < 21                       % when 1st column is class labels
   truelabels = data(:,1);
   data = data(:,2:dim);
  % dim = dim-1;
  % datasort_bylabel
end
dc = 2;

if id == 22
  % remove half of cancer & normal tissures closer to each other under Euclidean metric
  Dist= similarity_euclid(data');
  cancers = [1,3,5,7,9,11,13,15,17,19,21,23,25,26,27,28,29,30,31,32,...
      33,34,35,36,37,38,40,41,44,45,46,47,49,52,53,56,57,58,59,61];
  normals = [2,4,6,8,10,12,14,16,18,20,22,24,39,42,43,48,50,51,54,55,60,62];
  [A1,B1] = findnear(Dist,normals',11,cancers',20,2);
  A1 = setdiff(normals,A1);
  B1 = setdiff(cancers,B1);
  data = data(:,[A1 B1]);
end

Contact us at files@mathworks.com