Swarm Rapid Centroid Estimation: A particle swarm clustering algorithm

An efficient particle swarm approach for rapid optimization of cluster centroids.
2.1K Downloads
Updated 10 Nov 2014

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 $

Cite As

Mitchell Yuwono (2024). Swarm Rapid Centroid Estimation: A particle swarm clustering algorithm (https://www.mathworks.com/matlabcentral/fileexchange/38107-swarm-rapid-centroid-estimation-a-particle-swarm-clustering-algorithm), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.21.0.0

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.0.0

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

1.19.0.0

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

1.18.0.0

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.0.0

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.0.0

Major changes and bug fixes

1.7.0.0

Description updated

1.3.0.0

Updated Description

1.0.0.0