0% found this document useful (0 votes)
9 views14 pages

Woa Bahasa Inggris

Uploaded by

sahril safikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Woa Bahasa Inggris

Uploaded by

sahril safikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Cogent Mathematics & Statistics

ISSN: (Print) 2574-2558 (Online) Journal homepage: www.tandfonline.com/journals/oama21

A whale optimization algorithm (WOA) approach


for clustering

Jhila Nasiri & Farzin Modarres Khiyabani |

To cite this article: Jhila Nasiri & Farzin Modarres Khiyabani | (2018) A whale optimization
algorithm (WOA) approach for clustering, Cogent Mathematics & Statistics, 5:1, 1483565, DOI:
10.1080/25742558.2018.1483565

To link to this article: https://doi.org/10.1080/25742558.2018.1483565

© 2018 The Author(s). This open access


article is distributed under a Creative
Commons Attribution (CC-BY) 4.0 license

Published online: 27 Jun 2018.

Submit your article to this journal

Article views: 15685

View related articles

View Crossmark data

Citing articles: 113 View citing articles

Full Terms & Conditions of access and use can be found at


https://www.tandfonline.com/action/journalInformation?journalCode=oama23
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

APPLIED & INTERDISCIPLINARY MATHEMATICS | RESEARCH ARTICLE


A whale optimization algorithm (WOA) approach
for clustering
Jhila Nasiri1 and Farzin Modarres Khiyabani1*

Received: 04 September 2017 Abstract: Clustering is a powerful technique in data-mining, which involves
Accepted: 23 May 2018
First Published: 08 May 2018 identifing homogeneous groups of objects based on the values of attributes.
Meta-heuristic algorithms such as particle swarm optimization, artificial bee
*Corresponding author: Farzin
Modarres Khiyabani, Department of colony, genetic algorithm and differential evolution are now becoming powerful
Mathematics, Tabriz Branch, Islamic
Azad University, Tabriz, Iran. methods for clustering. In this paper, we propose a new meta-heuristic clus-
E-mail: [email protected] tering method, the Whale Clustering Optimization Algorithm, based on the
Reviewing editor: swarm foraging behavior of humpback whales. After a detailed formulation and
Akiko Yoshise, University of Tsukuba,
Japan
explanation of its implementation, we will then compare the proposed algo-
rithm with other existing well-known algorithms in clustering, including PSO,
Additional information is available at
the end of the article ABC, GA, DE and k-means. Proposed algorithm was tested using one artificial
and seven real benchmark data sets from the UCI machine learning repository.
Simulations show that the proposed algorithm can successfully be used for data
clustering.

Subjects: Computer Mathematics; Mathematical Modeling; Applied Mechanics

Keywords: meta-heuristic algorithms; whale optimization algorithm; clustering; k-means

1. Introduction
Data mining is the procedure of identifying correlation and patterns among attributes in databases
by using appropriate techniques.

ABOUT THE AUTHORS PUBLIC INTEREST STATEMENT


J. Nasiri Roveshti is currently Ph.D. student in Clustering is an important and useful operation in
IAU, Tabriz Branch, Iran. Her current interests data-mining, which involves classifying a particu-
include data mining and optimization. lar set of unlabeled data into two or more groups,
Farzin Modarres Khiyabani is an assistant so that there is maximum similarity among the
professor of mathematics at Tabriz Islamic data of each claster based on the selection cri-
Azad University. His research interests include teria. Clustering algorithms cover a broad spec-
operation research, meta-heuristic algorithms, trum of utilization, having applications in such
numerical optimization and image processing. diverse fields as medical science, decision making,
His articles have been published in various manufacturing, image processing, etc. Nawdays,
international journals indexed in WOS. considering the existence of such a massive
amount of non-labeled data, the deployment of
intelligent methods for data clustering has
become a necessity. Therefore, this study deploys
whale optimization algorithm (WOA) to solve
clustering problems. The obtained solutions of the
proposed algorithm are more accurate than those
achieved using existing methods; moreover, due
to its search methodology, the possibility of local
optima entrapment is very low.

© 2018 The Author(s). This open access article is distributed under a Creative Commons
Attribution (CC-BY) 4.0 license.

Page 1 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Data mining levels are preprocessing of data, selection of efficient and appropriate algorithm and
to analyze the data. Some of the methods in data mining are the summation, association, and
clustering. Data clustering is the most popular and practical method of them, that have been used
for a variety of applications in data mining as pattern recognition (Andrews, 1972; Chen, Kim, &
Mahnassani, 2014; Chen, Qi, Fan, Limeng, & Yong, 2015), image analysis (Aziz, Ewees, & Hassanien,
2018; Chien-Chang, Hung-Hun, Meng-Yuan, & Horng-Shing, 2018; Lillesand & Keifer, 1994), security,
vector quantization and other fields (Chiranjeevi & Jena, 2016; Gribkova, 2015; He, Pan, & Lin, 2006).

Clustering is gathering unlabelled objects into groups with respect to similarities between these
objects. Such that the objects in the same cluster are more similar to each other than objects in
different clusters according to some predefined criteria (Elhag & Ozcan, 2018; Zhang, Ouyang, &
Ning, 2010). A number of algorithms have been proposed that take into account the nature of the
data, the quantity of the data and other input parameters in order to cluster the data. The
similarity criteria in clustering are various in different researches. Most of the clustering problems
have exponential complexity in terms of the number of clusters. Because most of the similarity
criterion functions are non-complex and nonlinear, clustering problems have several local solu-
tions (Welch, 1982).

Clustering algorithms can be simply classified as hierarchical clustering and partitional clustering
(Frigui & Krishnapuram, 1999; Han & Kamber, 2001; Leung, Zhang, & Xu, 2000; Sander, 2003).
Hierarchical clustering groups data with a sequence of partitions either from singleton clusters to a
cluster, including all objects or vice versa. This study is centralized on partitional clustering, that
divide the data set into a set of disjoint clusters. The most popular partitional clustering algorithms
are the prototype-based clustering algorithms where each cluster is represented by the center of
the cluster, and the used objective function is the sum of the distance from the object to the
center.

k-means is a popular, center-based clustering approach due to its simplicity and efficiency with
linear complexity. However, the solution of the k-means algorithm depends on the initial random
state and always converges to the local optimum (Jain & Dubes, 1998; MacQueen, 1967). Recently,
researchers to overcoming this problem have presented heuristic clustering algorithms. Due to the
large amount of information and the complexity of the problems, classical optimization methods
are incapable of solving most of the optimization problems; therefore, researchers have started to
use meta-framework algorithms. Today, nature-inspired algorithms are widely used to solve these
problems in various fields (Faieghi & Baeanu, 2012; Farnad & Baleana, 2018; Sharma & Buddhirju,
2018). Meanwhile, clustering techniques, as well as other data mining and data analysis steps,
have made significant progress using the collective intelligence algorithms.

Clustering with heuristic algorithms is emerging as an alternative to more conventional cluster-


ing techniques (Cui, 2017; Zhang et al., 2010).

Selim and Al-Sultan (Selim & Al-Sultan, 1991) used a simulated annealing approach for the
clustering problem. Predetermined parameters of the algorithm are discussed and its convergence
to a global solution of the clustering problem is demonstrated.

Mualik and Mukhopadhyay (Maulik & Mukhopadhyay, 2010) presented a combined clustering
algorithm. They combined SA with artificial neural networks to improve solution quality. The
proposed hybrid algorithm was used to cluster three real-life microarray data sets and the results
of the proposed approach were compared with some commonly used clustering algorithms. The
results indicated the superiority of the new algorithm. Mualik and Bundyopadyay (Mualik &
Bandyopadhyay, 2000) presented an approach based on genetic algorithm to solve the clustering
problem. They examined the algorithm on synthetic and real-life data sets to evaluate its
performance.

Page 2 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Shelokar et al. (Shelokar, Jayaraman, & Kulkarni, 2004) proposed a clustering algorithm based on
ant colony optimization (ACO). The proposed algorithm was tested on some artificial and real-life
data sets. The performance of this technique in comparison with popular algorithms such as GA,
SA, and TS appeared to be very promising. Merve et al. (Van Der Merve & Engelhrecht, 2003)
presented an approach to solving clustering problem used the particle swarm optimization (PSO)
algorithm. A PSO clustering and a hybrid method were used, where the particles of the swarm are
selected by the answers of the k-means algorithm. Both methods were compared with the
k-means algorithm and the results indicated that the proposed algorithms and better answers.

Tunchan (Tunchan, 2012) presented a new PSO approach to the clustering problem that is
efficient, easy-to-tune and applicable when the number of clusters is known or unknown.
Karaboga et al. (Karaboga & Ozturk, 2011) used the artificial bee colony algorithm to solve the
clustering problem. The results of simulations on 13 test problems from UCI indicated the superior
performance of the proposed algorithm in comparison to PSO algorithm and some other
approaches. Furthermore, the authors were found that the ABC algorithm can be appropriate to
solve multivariate clustering problems.

Zhang et al. (Zhang et al., 2010) proposed an artificial bee colony (ABC) clustering algorithm to
clustering that Deb’s rule is used to selection process instead of greedy selection. They test the
algorithm on several well-known real data sets and compared with other popular heuristics
algorithms in clustering. Results were very encouraging in terms of the quality of clusters.
Armando and Farmani (Armando & Farmani, 2014) proposed a method that is the combined of
k-means and ABC algorithms to improve the efficiency of k-means in finding a global optimum
solution.

Karthikeyan and Christopher (Karthikeyan & Christopher, 2014) propose an algorithm by a


combination of PSO algorithm and ABC algorithm used for data. This algorithm is compared with
other existing clustering algorithms to evaluate the performance of the proposed approach.
Sandeep and Pankaj (Sandeep & Pankaj, 2014) proposed a new hybrid sequential clustering
approach, that uses PSO algorithm in sequence with the Fuzzy k-means algorithm in data cluster-
ing. Experimental results show that the new approach improves quality of formed clusters and
avoids being trapped in local optima.

Recently, Mirjalili and Lewis (Mirjalili & Lewi, 2016) described a new swarm based meta-heuristic
optimization algorithm that mimicking the social behavior of humpback whales in hunting that
called whale optimization algorithm (WOA)(Mirjalili, Mirjalili, & Lewis, 2014¸Mirjalili & Lewi, 2016,
Horng, Dao, Shieh, & Nguyen, 2017). The algorithm is inspired by the bubble_net hunting strategy.
They have tested the WOA algorithm with 29 mathematical benchmark optimization problems and
compared the performance of WOA algorithm with other conventional modern heuristic algo-
rithms such as PSO (Kenedy & Eberhart, 1995), Differential Evolutional (Storn & Price, 1997),
Gravitational Search Algorithm (Rashedi, Nezamabadi- Pour, & Saryazdi, 2009) and Fast
Evolutionary Programming (Yao & Liu, 1999). WOA was recognized to be enough competitive
with other well-known and popular meta-heuristic methods.

In this paper, the WOA algorithm is extended for solving the clustering problem as an optimiza-
tion problem. We intend to use the advantages of the whale optimization algorithm, such as the
low number of parameters and lack of local optima entrapment, in solving clustering problems.
Our main goal is to cluster unlabeled data using the whale optimization algorithm so that we can
get better results with simple solutions and do a complete search compared to the existing
methods. The performance of the proposed algorithm has been tested on various data sets and
compared with several clustering algorithms. The remaining of this paper is organized as follows:
Section 2 discussed the clustering problem. Section 3 describes the WOA algorithm. The new WOA
clustering algorithm was proposed in section 4. Section 5 provided the experimental results.
Finally, conclusions and some future research direction are in section 6.

Page 3 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

2. The clustering problem


Clustering is applied to grouping data objects of a given data set based on some similarity
measures. Similar objects are ideally put in the same cluster while dissimilar objects are placed
in different clusters. Most of the researchers used instance measurement for evaluating similarities
between objects, which is obtained from the Minkouski metric.

In general, the problem can be expressed as follows: Suppose that s ¼ fx1 ; x2 ; . . . ; xn g be a set
of n objects of a data set with m dimensions. Each xi is described by a real-valued m dimensional
vector as fxi1 ; xi2 ; . . . ; xim g; where each xij denotes the value of jth attribute of the ith object. The
goal of clustering is assigned each object xi to one of the k cluster in the set of partition
z ¼ fc1 ; c2 ; . . . ; ck g, such that distance between xi and zk center of kth cluster center be the
minimum and

1. "iÞj ci \ cj ¼ ;

2. [ki¼1 ci ¼ s;

3. "i ci Þ  .

So, clustering problem is minimizing the following Euclidean distance:

n K 1
dðs; zÞ ¼ ð∑ ∑ wik kxi  zk k2 Þ2 ; (2:1)
i¼1 k¼1

where xi denotes ith data object and zi represents the kth cluster center. wik is the association
weight of pattern xi with cluster k and defined as
  2
wik ¼ 1 & if kxi  zk k2 ¼ min1jn xi  zj  ; (2:2)
0 & otherwise :

According to Equation (2.2), we assign each object to the nearest cluster center out of the all
cluster centers.

3. Whale optimization algorithm


Whale optimization algorithm was proposed by Jalili and Lewis for optimizing numerical
problems (Mirjalili & Lewi, 2016). The algorithm simulates the intelligence hunting behavior of
humpback whales. This foraging behavior is called bubble-net feeding method that is only be
observed in humpback whales. The whales create the typical bubbles along a circle path while
encircling prey during hunting. Simply, bubble-net hunting behavior could describe such that
humpback whales dive down approximation 12 m and then create the bubble in a spiral shape
around the prey and then swim upward the surface following the bubbles. In order to perform
optimization, the mathematical model for spiral bubble-net feeding behavior is given as
follows:

3.1. Encircling prey


Humpback whales can find the place of prey and encircle them. The WOA algorithm considers;
current best search agent position be the target prey or close to the optimum point, and other
search agents will try to update their position towards the best search agent. This behavior is
formulated as the following equations:
 ! ! 
!
 !

D ¼ C: X ðtÞ  XðtÞ; (3:1)

! ! ! !
Xðt þ 1Þ ¼ X ðtÞ  A:D; (3:2)

Page 4 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

where t indicates the current iteration, X is the position vector of the best solution have been
!
obtained so far iteration t, X is the position vector of each agent, | | is the absolute value, and . is an
! !
element-by-element multiplication. The coefficient vectors A and C are calculated as follows:
! ! !
A ¼ 2a:r  a; (3:3)

!
C ¼ 2r; (3:4)
!
where a is linearly decreased from 2 to 0 over the course of the iteration and r is a random
number [0,1].

3.2. Bubble-net attacking method


The Bubble-net strategy is hybrid of combined two approaches that can be mathematically model
as follows::

a. Shrinking Encircling Mechanism

!
This behavior of Whales simulated by decreasing the value of a in the equation (3.3). Note that
! ! !
the fluctuation range of A is also decreased by a . In other words, A is a random value in the
interval ½a; a where a is decreased from 2 to 0 over the course of iterations. Setting random
!
values for A in [−1,1], the new position of a search agent can be defined anywhere in between the
original position of the agent and the position of the current best agent.

b. Spiral Updating Position

In this approach, a spiral equation is created between the position of whale and prey to simulate
the helix-shaped movement of humpback whales as follows:
!0  ! !


D ¼  X ðtÞ  XðtÞ; (3:5)

! ! !
Xðt þ 1Þ ¼ D0 :ebl :cosð2πlÞ þ X ðtÞ; (3:6)
!
where D0 is the distance between the whale and prey, b is constant defines the logarithmic shape, l
is random in [−1,1] and is an element-by-element multiplication.

Indeed, humpback whales swim along a spiral-shaped path and at the same time within
shrinking circle. Assuming a probability of 50%, choosing either the shrinking encircling movement
or the spiral model movement is simulated during iterations of the algorithm. It means that:
( ! !!
! X ðtÞ  A : D if p < 0:5;
X ðt þ 1Þ ¼ !0 ! (3:7)

D :e : cosð2πlÞ þ X ðtÞ
bl
if p  0:5;

where p is a random number in [0,1].

3.3. Search for prey


Almost all meta-heuristic algorithms explore the optimum using random selection. In the bubble-
net method, the position of the optimal design is not known, so humpback whales search for prey
! !
randomly. In contrast to the exploitation phase with A in interval [−1,1] in this phase consider, A be
a vector of the random values greater than 1 or less than −1. With this assumption, search agent
able to move far away from a reference whale. In return, the position of search agent will be
updated according to randomly chosen from search agent, instead of the best search agent found
so far. These two actions formulated as follows:

Page 5 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

 ! ! ! 
!
 
D ¼ C:Xrand  X; (3:8)

! ! ! !
Xðt þ 1Þ ¼ Xrand  A:D; (3:9)

where Xrand is a random position vector.

The WOA algorithm starts from a set of random solutions. At each iteration, search agents
update their position according to the above explanations. WOA is a global optimizer. Adaptive
!
variation of the search vector A allows the WOA algorithm easily transit between exploration and
exploitation. Furthermore, WOA includes only two main internal parameters to be adjusted. High
exploration ability of WOA is due to the position updating mechanism of Whales using (3.9). High
exploitation and convergence are emphasized, which originate from (3.6) and (3.2). These equa-
tions show that the WOA algorithm is able to provide high local optima avoidance and conver-
gence speed during the course of the iteration.

4. Whale optimization-based clustering algorithm


Whale optimization algorithm is a new meta-heuristic optimization algorithm that simulates the
intelligence bubble-net hunting behavior of humpback whales. WOA is a simple, robust and swarm
based stochastic optimization algorithm. Population-based WOA has an ability to avoid local
optima and get a global optimal solution. These advantages cause WOA to be an appropriate
algorithm for solving different constrained or unconstrained optimization problems for practical
applications without structural reformation in the algorithm.

In the context of WOA, a swarm refers to a number of potential solutions to the optimization
problem, where each potential solution is referred to as a search agent. The aim of the WOA is to
find the search agent position that results in the best evaluation of a given objective function.

In this section, we are going to solve the clustering problem using WOA. Inspired by the context
of clustering, assume that search agent represents k cluster centers (k is predefined and shows the
number of clusters). Each search agent Xi is constructed as follows:

Xi ¼ ðzi1 ; zi2 ; . . . ; zik Þ; (4:1)

where zij refers to the jth cluster center vector of the ith search agent in cluster cij . Therefore, a
swarm represents a number of candidates clustering for the vectors of the data set. We prefer
intra-distance of clusters be the fitness function that measures the distance between cluster
center and data vectors of the same cluster according to Equations (2.1) and (2.2).

According to above assumptions the pseudo code of whale optimization clustering algorithm
proposes as follows: pseudocode

Algorithm 1 The Whale Optimization-based Clustering Algorithm

1: procedure
2: Load data samples
3: Initialize each search agent to contain k randomly cluster centers
4: while t < Iteration do
5: for each search agent i do
6: for each data vector xp do
7: Calculate the Euclidean distance of xp to all cluster centers.
8: Assign xp to the cluster cij such that
   
xp  zij  ¼ min xp  zic  :
c¼1;2;...;k

Page 6 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

9: Calculate the fitness using (4.2)


k n  
fitness ¼ ∑ ∑ wij xij  zij ; (4:2)
j¼1 i¼1

(  
1 if xi  zij  ¼ min jxi  zim j ;
where wij ¼ 1mk
0 else:

10: end for


11: end for
12: X is the best search agent
13: for each search agent do
14: update a, A, C, I and p
15: if p < 0:5 then
16: if jAj < 1 then
17: update search agent by (3.2)
18: else if j Aj  1 then
19: select random search agent
20: update current search agent by (3.9)
21: end if
22: else if p  0:5 then
23: update the position of current search agent by (3.6)
24: end if
25: end for
26: t=t+1
27: end while
28: return X
29: end procedure

From theoretical standpoint, WOA clustering algorithm can be considered as a global optimizer
because it includes exploration and exploitation ability simultaneously. Furthermore, the proposed
hyper-cube mechanism defines a search space in the neighborhood of the best solution and allows
other search agents to exploit the current best record inside that domain. Adaptive variation of the
search vector A allows the WOA clustering algorithm to smoothly transit between exploration and
exploitation. It means that by decreasing A, some iterations are concentrated to exploration, and
the rest is dedicated to exploitation.

5. Experimental study
In this work, the performance of WOA clustering approach was compared to well-known algo-
rithms namely the ABC clustering proposed by Karaboga and Ozturk (Karaboga & Ozturk, 2011),
the PSO clustering proposed by Merve and Engelbrecht (Van Der Merve & Engelhrecht, 2003), the
differential evolution-based (DE) clustering algorithm proposed by Sakar et al. (Sarkar,
Yegnanafayana, & Khemani, 1997), the genetic algorithm-based clustering technique, called GA-
clustering (GA), proposed by Mualik and Bandyopadyay (Mualik & Bandyopadhyay, 2000) and
k-means a vector quantization algorithm proposed by MacQueen (MacQueen, 1967). All algorithms
were programmed in Matlab 2013b and executed on an Intel core, i7 CPU, 4 Gb and 1.73 GHz
computer running Microsoft Windows XP. The parameter settings are the same in the original
corresponding papers. Here, 8 data sets are used to evaluate the performance of proposed
algorithm compared with above heuristics. One artificial data set that is generated in Matlab
environment using mean vector μ and variance matrix sigma. Other data sets are from classifica-
tion problems from the UCI databases (Blake & Merz, 1998) that are Iris, wine, contraceptive
method choice (CMC), Balance, Breast Cancer, Glass and Thyroid data sets. The data sets are used
in this study can be described as follows:

Page 7 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Artificial data set ART: This data sets contain 300 objects and three clusters. Samples are drawn
from three independent bivariate normal distribution, where classes were distributed according to
 
0:5 0:05
μ1 ¼ ½0; 0, μ2 ¼ ½3; 4, μ3 ¼ ½6; 1 and sigma ¼ is the covariance matrix.
0:05 0:5

The artificial produced data set are described in Figure 1.

Figure 1 visualizes the clusters performed by WOA clustering approach on art data set. Attention
at position of the cluster centers specified by WOA shows that proposed algorithm has a high
ability to find the global optimal answers.

Iris data set: This data set contains 150 random samples of flowers from the Iris species setosa,
versicolor and virginica used by Fisher (Fisher, 1936). From each species, there are 50 observations
with four attributes, which are sepal length, sepal width, petal length and petal width in cm.

Wine data set: This data set are the results of a chemical analysis of wines grown in the same
region in Italy but derived from three different cultivars (Forina, Leardi, Armanino, & Lanteri, 1998).
The analysis determined the quantities of 13 constituents found in each of the three types of
wines. So, there are 178 instances with 13 numeric attributes in Wine data set.

Figure 1. The ART datset and


clustering of ART data set.

Page 8 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

CMC data set are a subset of the 1987 Indonesia Contraceptive Prevalence survey. The samples
are married women who were either not pregnant or do not know if they were at the time of the
interview. The problem involves predicting the choice of the current contraceptive method of a
woman based on her demographic and socio-economic characteristics. This data set contains
1473 objects with 9 attributes and 3 clusters.

Balance data set: This data set was generated to model psychological experimental results. Each
example is classified as having the balance scale tip to the right, tip to the left or be balanced. The
data set include 4 inputs, 3 classes and there are 625 examples.

Cancer data set: This data set is based on Breast Cancer Wisconsin-Original set. It contains 569
patterns with 11 attributes and 2 clusters.

Glass data set: This data set contains one of the biggest numbers of classes. It is used to classify
glass types as float processed building windows, vehicle windows, containers, tablewares or
headlamps. Nine inputs are based on 9 chemical measurements with one of six types of glass,
which are continuous with 70, 76, 17, 13, 9 and 29 instances of each class respectively. The total
number of instances is 214.

Thyroid data set: This data set is the diagnosis of thyroid, whether it is hyper or hypofunction.
Five inputs are used to classify three classes of Thyroid function as being over function, normal
function or under function. The data set is based on new-thyroid data and contains 215 patterns.
There are two control parameters in WOA algorithm. The swarm size of whales set in 50 and the
maximum number of iteration supposed to 300. The parameter settings of ABC, PSO, GA, DE and
ACO are set the same as their original papers. The effectiveness of stochastic algorithms is greatly
dependent on 20 times individually for their own effectiveness test, each time with randomly
generated initial solutions.

Table 1 summarizes results, obtained from the clustering algorithms for the data sets described
above. The values reported are averages of intra-cluster distances over 20 simulations, standard
deviations, and ranking of the techniques based on mean values. At a glance, it is obvious that the
WOA algorithm gets the best performance in six of the problems and the second rank in two problems.
In artificial problem and Iris, Balance, Cancer and Thyroid data sets proposed algorithm is in rank 1 in
comparison with other algorithms. In Glass problem, that contains one of the biggest numbers of
clusters, also the WOA clustering algorithm is in rank 1 and mean value of intra-cluster distance
function is 231.29. This value is very smaller in comparison with other algorithms. IN Glass problem
PSO algorithm is in rank 2 and mean value, in this case, is 240.89. This result shows the excellence of
WOA clustering algorithm between the other swarm intelligence algorithms. The high performance of
WOA clustering in average values will be highlighted when reviewing the values of standard deviations
in different clustering algorithms. For example, in Iris and Cancer problems, proposed algorithm has
the smallest SD values. In Wine, CMC and Thyroid SD values are in second place.

It is worthy to note that, biggest value of SD is in WOA clustering algorithm is 4.51 that be seen in
Glass problem. According to mean value of WOA in CMC problem, the high value of SD is negligible. As
a result of above discussion, solutions of using WOA to solve clustering problem is very significant and
successful. By foreseeing the benefits of WOA algorithm namely, the lowest number of predeter-
mined parameters, simplicity in implementation, ability to avoid local optima and get a globally
optimal solution, It can be said that WOA clustering is an excellent offer to solve clustering problems.

The convergence of curves of the WOA and PSO clustering for ART, Cancer, Glass and Thyroid
data sets are provided in Figure 2. As it is obvious in this figure, usually the WOA clustering (with
intra-cluster distance fitness function) behavior in the convergence towards the optimum only in
final iterations. This is probably due to avoiding local optimum. This means that, the algorithm fails
in local search and as a result does exploration in the initial steps of iteration avoiding local search,

Page 9 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Table 1. Comparison of the performance of WOA clustering algorithm with other well-known
clustering algorithms
Data set Criteria k-Means DE GA ABC PSO WOA
Mean 374.87 271.4227 271.2278 271.3474 271.2276 268.8007
ART SD 123.04 0.25 0.00017 0.16 0 0.74
Rank 6 5 3 4 2 1
Mean 103.58 125.3395 120.0766 97.0986 97.4058 96.7993
Iris SD 12.48 1.13 0.36 0.43 0.26 0.10
Rank 3 5 4 2 3 1
Mean 18,560.00 16,530.11 16,493.9314 16,394.8211 16,292.96 16,295.00
Wine SD 2869 1.32 0.75 1.29 8.05 0.72
Rank 6 5 4 3 1 2
Mean 5853.57 5794.273 5732.8690 5643.8491 5532.096 5539.72
CMC SD 1.63 30.90 0.64 10.00 14.78 0.79
Rank 6 5 4 3 1 2
Mean 1427.52 1427.869 1425.489 1429.9450 1424.754 1423.8
Balance SD 3.49 1.05 0.94 1.32 0.35 0.98
Rank 4 5 3 6 2 1
Mean 3262.35 3237.142 3237.9260 3036.9551 3037.963 3036.12
Cancer SD 0.16 0.19 0.25 0.048 6.44 0.20
Rank 6 4 5 2 3 1
Mean 255.073 261.0285 252.2135 256.0595 240.8885 231.2912
Glass SD 4.72 7.66 1.56 2.94 12.06 4.51
Rank 5 6 3 4 2 1
Mean 1995.189 1877.237 1888.209 1897.4211 1890.2071 1870.93
Thyroid SD 10.78 6.05 6.90 6.62 0 1.3
Rank 6 2 3 5 4 1

but in the last iterations, algorithm cleverly tends towards the global optimum response. In 100
last iterations, the performance of algorithm in local search improves significantly and finally PSO
fails compared with WOA.

6. Conclusion
Nowadays, simulation the intelligence behavior of animals and insects for solving the search and
optimization problems is very common. Whale optimization algorithm which is inspired by bubble-
net the haunting strategy of humpback whales is most closely studied a meta-heuristic algorithm
in the area of swarm intelligence, which is a new, simple and robust optimization approach. In this
paper, the whale optimization algorithm developed to solve popular clustering problem. Clustering
is gathering data into clusters such that the data in the same cluster have a high degree of
similarity and data from different clusters being as possible as dissimilar. The results of this
algorithm is compared with well-known k-means clustering approach and other popular stochastic
algorithms such as PSO, artificial bee colony, differential evolution, and genetic algorithm cluster-
ing. The Preliminary computational experience in terms of the intra-cluster distance function and
standard deviation shows that the whale optimization algorithm can successfully be applied to
solve clustering problems. Moreover, these results proposed algorithm was effective, easy to
implementation and robust as compared with other approaches. There are some directions that
can improve the performance of the proposed algorithm in the future. The combination of WOA
clustering algorithm with other clustering approaches and using other fitness functions in cluster-
ing approach can be further researches.

Page 10 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Figure 2. Convergence of curves


of the WOA and PSO for some
data sets.

Funding Retrieved from http://www.ics.uci.edu/mlearn/


The authors received no direct funding for this research. MLRepository.html.
Chen, Y., Kim, J., & Mahnassani, H. (2014). Pattern recog-
Author details nition using clustering algorithm for scenario defini-
Jhila Nasiri1 tion in traffic simulation- based decision support
E-mail: [email protected] systems. IEEE 17th International Conference on
ORCID ID: http://orcid.org/0000-0003-3140-4211 Intelligent Systems., 798–803.
Farzin Modarres Khiyabani1 Chen, Z., Qi, Z., Fan, M., Limeng, C., & Yong, S. (2015).
E-mail: [email protected] Image segmention via improving clustering algo-
ORCID ID: http://orcid.org/0000-0002-7688-2535 rithms with density and distance. Information
1
Department of Mathematics, Tabriz Branch, Islamic Azad Technology and Quantitative Management, 55,
University, Tabriz, Iran. 1015–1022.
Chien-Chang, C., Hung-Hun, J., Meng-Yuan, T., & Horng-
Citation information Shing, L. H. (2018). Unsupervised learning and pat-
Cite this article as: A whale optimization algorithm (WOA) tern recognition of biological data structures with
approach for clustering, Jhila Nasiri & Farzin Modarres density functional theory and manchine learning.
Khiyabani, Cogent Mathematics & Statistics (2018), 5: Scientific Reports, 8, 557. doi:10.1038/s41598-017-
1483565. 18931-5
Chiranjeevi, K., & Jena, U. R. (2016). Image compression
References based on vector quantization using cuckoo search
Andrews, H. C. (1972). Introduction to mathematical techni- optimization technique. Ain Shams Engineering
ques in pattern recognition. New York, NY: Wiley- Journal. doi:10.1016/j.asej.2016.09.009
Interscience . Cui, D. (2017). Application of whale optimization algo-
Armando, G., & Farmani, M. R. (2014). Clustering analysis rithm in reservoir optimal operation. Advances in
with combination of artificial bee colony algorithm Science and Technology of Water Resources, 37(3),
and k-means technique. International Journal of 72–79, 94.
Computer Theory and Engineering, 6(2), 141–145. Elhag, A., & Ozcan, E. (2018). Data clustering using
doi:10.7763/IJCTE.2014.V6.852 grouping hyper-heuristics. Evolutionary Computation
Aziz, M. A. E., Ewees, A. A., & Hassanien, A. E. (2018). in Combinatorial Optimization, LNCS, 10782, 101–115.
Multi-objective whale optimization algorithm for Faieghi, M. R., & Baeanu, D. (2012). Anovel adaptive con-
content- based image retrieval. Multimedia Tools and troller for two-degree of freedom polar robot with
Applications, 1–38. unkown perturbations. Communications in Nonlinear
Blake, C. L., & Merz, C. J. (1998). University of California at Science, 17(2), 1021–1030. doi:10.1016/j.
Irvine repository of machine learning databases. cnsns.2011.03.043

Page 11 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

Farnad, B., & Baleana, D. (2018). A new hybrid algorithm Mirjalili, S., & Lewi, A. (2016). The whale optimization
for continuous optimization problem. Applied algorithm. Advancement Engineering Softwares, 95,
Mathematical Modeling, 55, 652–673. doi:10.1016/j. 51–67. doi:10.1016/j.advengsoft.2016.01.008
apm.2017.10.001 Mirjalili, S., Mirjalili, S. M., & Lewis, A. (2014). Grey wolf
Fisher, R. A. (1936). The use of multiple measurements in optimizer. Advancement Engineering Software, 69,
taxonomic problems. Annual Eugenics, .7, 179–188. 46–61. doi:10.1016/j.advengsoft.2013.12.007
doi:10.1111/j.1469-1809.1936.tb02137.x Mualik, U., & Bandyopadhyay, S. (2000). Genetic algorithm-
Forina, M.,Leardi, R., Armanino, C. & Lanteri, S. based clustering technique. Pattern Recognition, 33,
(1998). PARVUS, An extendible package for data 1455–1465. doi:10.1016/S0031-3203(99)00137-5
exploration, classification and correlation. Via Brigata Rashedi, E., Nezamabadi- Pour, H., & Saryazdi, S. (2009).
Salerno, 16147 Genoa, Italy: Institute of pharma- GSA: A gravitational search algoritm. Information
ceutical and food analysis and technologies. Sciences, 179, 2232–2248. doi:10.1016/j.
Frigui, H., & Krishnapuram, R. (1999). A robust competitive ins.2009.03.004
clustering algorithm with applications in computer Sandeep, U. M., & Pankaj, G. G. (2014). Hybrid particle
vision. IEEE Transactions Pattern Analysis Mach swarm optimization (HPSO) for data clustering.
Intelligent, 21, 450–465. doi:10.1109/34.765656 International Computation Applications, 97(19), 1–5.
Gribkova, S. (2015). Vector quantization d clustering in the Sander, J. (2003). Coursteme homepage for principles of
presence of censoring. Multivariate Analysis, 140, knowledge discovery in data. Retrieved from: http://
220–233. doi:10.1016/j.jmva.2015.05.015 www.cs.ualberta.ca/-joerg.
Han, J., & Kamber, M. (2001). Data mining: Concepts and Sarkar, M., Yegnanafayana, B., & Khemani, D. (1997). A
techniques. Murgan Kufmann. clustering algorithm using an evolutionary program-
He, Y., Pan, W., & Lin, J. (2006). Cluster analysis using ming-based approach. Pattern Recognition, 975–986.
multivariate normal mixture models to detect dif- doi:10.1016/S0167-8655(97)00122-0
ferential gene expression with microarray data. Selim, S. Z., & Al-Sultan, K. (1991). A simulated annealing
Computer Statistical Data Analysis, 51, 641–658. algorithm for the clustering problem. Pattern
doi:10.1016/j.csda.2006.02.012 Recognition, 24(10), 1003–1008. doi:10.1016/0031-
Horng, M. F., Dao, T. K., Shieh, C. S., & Nguyen, T. T. (2017). 3203(91)90097-O
A multi-objective optimal vehicle fuel consumption Sharma, S., & Buddhirju, K. M. (2018). Spatial-spectral ant
based on whale optimization algorithm. Smart colony optimization for hyperspectralimage classifi-
Innovation Systems and Technologies, 64, 371–380. cation. International Journal of Remote Sensing, 39
Jain, A., & Dubes, R. (1998). Algorithms for clustering data. (9), 2702–2717. doi:10.1080/
Englewood Cliffs, NJ: Prentice-Hall. 01431161.2018.1430403
Karaboga, D., & Ozturk, C. (2011). A novel clustering Shelokar, P. S., Jayaraman, V. K., & Kulkarni, B. D. (2004).
approach: Artificial bee colony (ABC) algorithm. An ant colony approach for clustering. Analytica
Applications Soft Computation, 11(1), 652–657. Chimica Acta, 509, 187–195. doi:10.1016/j.
doi:10.1016/j.asoc.2009.12.025 aca.2003.12.032
Karthikeyan, S., & Christopher, T. (2014). A hybrid clus- Storn, R., & Price, K. (1997). Differential evolution- a sim-
tering approach using artificial bee colony (ABC) and ple and efficient heuristic for global optimization over
particle swarm optimization. International continuous spaces. Journal of Global Optimization,
Computation Applications, 100, 15. 11, 341–359. doi:10.1023/A:1008202821328
Kenedy, J., & Eberhart, R. (1995). Particle swarm optimi- Tunchan, C. (2012). A particle swarm optimization
zation. In: Proceeding of the 1995 IEEE international approach to clustering. Experiments System
conference on neural network, 194–208. Applications, 39, 1582–1588.
Leung, Y., Zhang, J., & Xu, Z. (2000). Clustering by scale- Van Der Merve, D. W., & Engelhrecht, A. P. (2003). Data
space filtering. IEEE Transactions Pattern Analysis Mach clustering using particle swarm optimization.
Intelligent, 22, 1396–1410. doi:10.1109/34.895974 Conference of evolutionary computation CEC03,
Lillesand, T., & Keifer, R. (1994). Remote sensing and 215–220.
image interpretation. New York, NY: John Wiley & Welch, J. W. (1982). Algorithmic complexity - 3 NP-Hard
Sons. problems in computational statistics. Journal
MacQueen, J. (1967). Some method for classification and Statistical Computation Sim, 15, 17–25. doi:10.1080/
analysis of multivariate observations. In: Proceeding 00949658208810560
of the fifth Berkeley symposium on mathematical Yao, X., & Liu, Y. (1999). Evolutionary programing made
statistics and probability, 1, 281–297. faster. IEEE Transactions Evolution Computer, 3, 82–
Maulik, U., & Mukhopadhyay, A. (2010). Simulated 102. doi:10.1109/4235.771163
annealing based automatic fuzzy clustering com- Zhang, C., Ouyang, D., & Ning, J. (2010). An artificial bee
bined with ANN classification for analyzing micro- colony approach for clustering. Experiments System
array data. Computation Operational Researcher, 37, Applications, 37, 4761–4767. doi:10.1016/j.
1369–1380. doi:10.1016/j.cor.2009.02.025 eswa.2009.11.003

Page 12 of 13
Nasiri & Khiyabani, Cogent Mathematics & Statistics (2018), 5: 1483565
https://doi.org/10.1080/25742558.2018.1483565

© 2018 The Author(s). This open access article is distributed under a Creative Commons Attribution (CC-BY) 4.0 license.
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
No additional restrictions
You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Cogent Mathematics & Statistics (ISSN: 2574-2558) is published by Cogent OA, part of Taylor & Francis Group.
Publishing with Cogent OA ensures:
• Immediate, universal access to your article on publication
• High visibility and discoverability via the Cogent OA website as well as Taylor & Francis Online
• Download and citation statistics for your article
• Rapid online publication
• Input from, and dialog with, expert editors and editorial boards
• Retention of full copyright of your article
• Guaranteed legacy preservation of your article
• Discounts and waivers for authors in developing regions
Submit your manuscript to a Cogent OA journal at www.CogentOA.com

Page 13 of 13

You might also like