Code covered by the BSD License

### Highlights from Swarm Rapid Centroid Estimation: A particle swarm clustering algorithm

5.0
5.0 | 1 rating Rate this file 31 Downloads (last 30 days) File Size: 14.1 KB File ID: #38107 Version: 1.21

# Swarm Rapid Centroid Estimation: A particle swarm clustering algorithm

### Mitchell Yuwono (view profile)

10 Sep 2012 (Updated )

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

File Information
Description

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;

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.

\$Revision: 1.2.0 \$ \$Date: 2014/11/10 18:02:00 \$

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 7.10 (R2010a)
MATLAB Search Path
`/`

11 Sep 2012 1.3

Updated Description

12 Sep 2012 1.7

Description updated

05 Nov 2012 1.16

Major changes and bug fixes

21 Oct 2014 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.

08 Nov 2014 1.18

Implemented beta divergence for seeding the swarm when using mahalanobis distance.
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.

08 Nov 2014 1.19

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

09 Nov 2014 1.20

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

10 Nov 2014 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.