File Exchange

image thumbnail

Swarm Rapid Centroid Estimation: A particle swarm clustering algorithm

version 1.21 (14.1 KB) by

An efficient particle swarm approach for rapid optimization of cluster centroids.

19 Downloads

Updated

View License

RCE Rapid Centroid Estimation (RCE) clustering (2014): A semi-stochastic lightweight clustering algorithm using particle swarm.
Example Usage:

% An example run of the algorithm using Iris Dataset

clear all
close all;

% load iris dataset
load iris_dataset
X = irisInputs;
N = size(irisInputs,2);

% set the fuzzifier constant to 1.4
m = 1.4;

% Optimize the swarm using 80% resampling rate and mahalanobis distance
swarm = RCE(X, 3, 'distance','mahalanobis','fuzzifier',m, 'display','text', ...
'swarm',6, 'subsprob',0.03, 'maxiter',100,'resampling_rate',0.8,'calculate_labels', false);

% calculate the fuzzy labels, crisp labels, and numeric labels from the
% input vectors using the Swarm
[softlabels, crisplabels, numlabels] = swarm_cluster(X,swarm);

% plot the fuzzy voronoi cells on the 1st and 3rd dimension
visualize_swarm(X,swarm,1,3,m,200)

% Perform fuzzy evidence accumulation on the swarm
ensemble = EnsembleAggregate(softlabels,'average',true);

% plot the scatter matrix
figure('name','scatterplot');
gplotmatrix(X(1:4,:)',[],ensemble.ensemble_labels)

RCE is proposed as a derivate of PSC algorithm with radically reduced time complexity. The quality of the results produced are similar to PSC. The advantage of RCE is RCE has lesser complexity, faster convergence, and reduced likelihood of suboptimal convergence [1-2]. Recent updates to RCE removes the redundancies of RCE and further decrease the overall complexity, enabling it to perform Ensemble Clustering in quasilinear complexity. The additional algorithms are Tsaipei-Wang's co-association tree (CA-tree) and Fuzzy Evidence Accumulation. The code for CA-tree will be provided in the next update.

References:
  [1] M. Yuwono, S.W. Su, B. Moulton, & H. Nguyen, "Data Clustering Using
      Variants of Rapid Centroid Estimation", IEEE Transactions on
      Evolutionary Computation, Vol 18, no.3, pp.366-377. ISSN:1089-778X.
      DOI:10.1109/TEVC.2013.2281545.
  [2] M. Yuwono, S.W. Su, B. Moulton, H. Nguyen, "An Algorithm for Scalable
      Clustering: Ensemble Rapid Centroid Estimation", in Proc 2014 IEEE
      Congress on Evolutionary Computation, 2014, pp.1250-1257.

  Copyright 2011-2014 Mitchell Yuwono.
  $Revision: 1.2.0 $ $Date: 2014/11/10 18:02:00 $

Comments and Ratings (3)

Mr.Su

Mr.Su (view profile)

Quang Lam

Please upload the data set iris_dataset.
Thank you,
Quang

Ahmad Azar

Updates

1.21

Disabled automatic calculation of labels and covariance matrices at the end of RCE.m for usability on larger datasets. Added swarm_cluster.m for this purpose.
Added inverse_covariance.m for inverting Sigma_inv if needed.
Added weighted_covariance.m

1.20

Bug fix in the main file RCE.m with regards to best position matrix updating. Final clustering quality is improved.

1.19

Corrected a bug in the visualize_swarm code. Updated the screenshot to showcase the visualization tools.

1.18

Implemented beta divergence for seeding the swarm when using mahalanobis distance.
Added:
a function to visualize the swarm in two dimensions using fuzzy voronoi cells.
a function to calculate the fuzzy consensus from the swarm.
a demo file.

1.17

Major update due to Ensemble Rapid Centroid Estimation (CEC 2014): Removed cognitive/social terms for further reducing the memory complexity. RCE code is completely rewritten. The results are now put inside a struct for convenience.

1.16

Major changes and bug fixes

1.7

Description updated

1.3

Updated Description

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video