<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">66534</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2025.066534</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Cluster Overlap as Objective Function</article-title>
<alt-title alt-title-type="left-running-head">Cluster Overlap as Objective Function</alt-title>
<alt-title alt-title-type="right-running-head">Cluster Overlap as Objective Function</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Fr&#x00E4;nti</surname><given-names>Pasi</given-names></name><xref ref-type="aff" rid="aff-1">1</xref><email>franti@cs.uef.fi</email></contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Cariou</surname><given-names>Claude</given-names></name><xref ref-type="aff" rid="aff-2">2</xref></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Zhao</surname><given-names>Qinpei</given-names></name><xref ref-type="aff" rid="aff-3">3</xref></contrib>
<aff id="aff-1"><label>1</label><institution>School of Computing, University of Eastern Finland</institution>, <addr-line>Joensuu, 80101</addr-line>, <country>Finland</country></aff>
<aff id="aff-2"><label>2</label><institution>Institut d&#x2019;Electronique et des Technologies du num&#x00E9;Rique, University of Rennes&#x2014;ENSSAT</institution>, <addr-line>Lannion, 22305</addr-line>, <country>France</country></aff>
<aff id="aff-3"><label>3</label><institution>School of Computer Science and Technology, Tongji University</institution>, <addr-line>Shanghai, 200092</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Pasi Fr&#x00E4;nti. Email: <email>franti@cs.uef.fi</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2025</year>
</pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>23</day><month>10</month><year>2025</year>
</pub-date>
<volume>85</volume>
<issue>3</issue>
<fpage>4687</fpage>
<lpage>4704</lpage>
<history>
<date date-type="received">
<day>10</day>
<month>4</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>26</day>
<month>8</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2025 The Authors.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Published by Tech Science Press.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_66534.pdf"></self-uri>
<abstract>
<p>K-means uses the sum-of-squared error as the objective function to minimize within-cluster distances. We show that, as a consequence, it also maximizes between-cluster variances. This means that the two measures do not provide complementary information and that using only one is enough. Based on this property, we propose a new objective function called <italic>cluster overlap</italic>, which is measured intuitively as the proportion of points shared between the clusters. We adopt the new function within k-means and present an algorithm called <italic>overlap k-means</italic>. It is an alternative way to design a k-means algorithm. A localized variant is also provided by limiting the overlap calculation to the neighboring points.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Clustering</kwd>
<kwd>k-means</kwd>
<kwd>overlap measure</kwd>
<kwd>within-cluster distance</kwd>
<kwd>between-cluster distance</kwd>
<kwd>arbitrary-shape clusters</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Clustering aims at grouping data points <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> into <italic>c</italic> clusters by minimizing an objective function that estimates the goodness of the clusters. We assume that there is a distance function <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> between the data points. Clustering is given as the partition index <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> of which cluster the object <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is assigned to, and the clusters are represented by their centroids <italic>c</italic><sub><italic>j</italic></sub>. The most common objective function is to minimize the sum of squared error between the data points and their cluster centroid:
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></disp-formula></p>
<p>K-means [<xref ref-type="bibr" rid="ref-1">1</xref>&#x2013;<xref ref-type="bibr" rid="ref-3">3</xref>] and many other algorithms [<xref ref-type="bibr" rid="ref-4">4</xref>&#x2013;<xref ref-type="bibr" rid="ref-9">9</xref>] use this objective function. It requires that we can calculate the centroid (mean). It is trivial in Euclidean space but becomes more complex for distance functions designed for strings, sets, time series, and GPS trajectories [<xref ref-type="bibr" rid="ref-10">10</xref>]. SSE can also be converted to an analytical function that can be optimized by gradient descent [<xref ref-type="bibr" rid="ref-11">11</xref>], coordinate descent [<xref ref-type="bibr" rid="ref-12">12</xref>], or its split-and-merge variant [<xref ref-type="bibr" rid="ref-13">13</xref>].</p>
<p>Another popular class of algorithms is agglomerative clustering. The idea is to build the clustering hierarchically, starting with <italic>n</italic> clusters and then merging clusters until their number reduces to <italic>c</italic>. Agglomerative clustering applies a local optimization strategy by considering all pairs of clusters and merging the pair that increases the objective function the least. Its main advantages are better clustering accuracy than k-means and the fact that it is not necessary to calculate the centroids.</p>
<p>Regardless of the objective function, we can simply calculate the merge cost as the difference in objective function value before and after the merge:
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mrow><mml:mi mathvariant="normal">&#x0394;</mml:mi></mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula>where <italic>f</italic><sub><italic>a</italic></sub> and <italic>f</italic><sub><italic>b</italic></sub> are the objective function values of the clusters <italic>a</italic> and <italic>b</italic> before the merge, and <italic>f</italic><sub><italic>a</italic>&#x002B;<italic>b</italic></sub> after their merge.</p>
<p>Many heuristics have been used to measure the <italic>merge cost</italic>. The most relevant to this paper is the classical <italic>Ward&#x2019;s method</italic> [<xref ref-type="bibr" rid="ref-14">14</xref>], which minimizes the same objective function as k-means (<italic>SSE</italic>). In the context of vector quantization, it is known as <italic>Pairwise nearest neighbor</italic> (PNN) [<xref ref-type="bibr" rid="ref-15">15</xref>]. Notably, the merge cost can be calculated only using the cluster sizes (<italic>n</italic><sub><italic>a</italic></sub>, <italic>n</italic><sub><italic>b</italic></sub>) and their centroids (<italic>c</italic><sub><italic>a</italic></sub>, <italic>c</italic><sub><italic>b</italic></sub>) in O(1) time [<xref ref-type="bibr" rid="ref-15">15</xref>]:
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mrow><mml:mtext>MergeCost</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfrac><mml:mo>&#x22C5;</mml:mo><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></disp-formula></p>
<p>A trivial implementation of the algorithm requires O(<italic>n</italic><sup>3</sup>) time even if the distance matrix is stored. This is due to the time-consuming search for the best pair [<xref ref-type="bibr" rid="ref-16">16</xref>].</p>
<p>A more efficient variant maintains only the pointer (and merge cost) of the best pair for every cluster. It reduces the time complexity close to O(<italic>n</italic><sup>2</sup>) with linear memory requirement [<xref ref-type="bibr" rid="ref-17">17</xref>]. A faster variant uses k-nearest neighbor graph, which reduces the time complexity to O(<italic>n</italic> log <italic>n</italic>) at a minor increase in the SSE-values: 0.0%, 0.2%, 2.6% (Birch datasets), and 1.0%, 2.6%, 4.3% (image datasets) [<xref ref-type="bibr" rid="ref-18">18</xref>].</p>
<p>Other objective functions have also been considered. Cut-based methods include <italic>Normalized cut</italic> [<xref ref-type="bibr" rid="ref-19">19</xref>] and <italic>Cut ratio</italic> [<xref ref-type="bibr" rid="ref-20">20</xref>] based on between-cluster distances. Graph-based methods first create a neighborhood graph and then use the links between the data points to define a cut. <italic>Conductance</italic> [<xref ref-type="bibr" rid="ref-21">21</xref>] calculates the ratio of between-cluster links and all links. <italic>Modularity</italic> [<xref ref-type="bibr" rid="ref-22">22</xref>] calculates the ratio of between-cluster and within-cluster distances. These objective functions have also been adopted into k-means when data is represented by a graph [<xref ref-type="bibr" rid="ref-23">23</xref>]. Between-cluster distances of each merge were measured during the agglomerative clustering process and then normalized by a generic function based on the cluster sizes [<xref ref-type="bibr" rid="ref-24">24</xref>].</p>
<p>Objective functions also exist in cases where the number of clusters is unknown. These are called <italic>internal cluster validity indexes</italic> and are used to compare clustering results with different values of <italic>c</italic>. Examples of indexes that work reasonably well according to our experiments include <italic>Calinski&#x2013;Harabasz</italic> [<xref ref-type="bibr" rid="ref-25">25</xref>], <italic>Silhouette coefficient</italic> [<xref ref-type="bibr" rid="ref-26">26</xref>], <italic>WB-index</italic> [<xref ref-type="bibr" rid="ref-27">27</xref>], and <italic>kCE-index</italic> [<xref ref-type="bibr" rid="ref-28">28</xref>]. They all measure the ratio of within-cluster and between-cluster distances normalized by the number of clusters in a slightly different way.</p>
<p>The most striking observation is that almost all indices are based on the same two variables: <italic>within-cluster</italic> and <italic>between-cluster</italic> distances [<xref ref-type="bibr" rid="ref-27">27</xref>]. In this paper, we show the properties and relationship of these two variables. In particular, we show that the between-cluster distances can be calculated directly from the within-cluster distances and vice versa. Thus, the two variables are not mutually exclusive. Instead, they measure essentially the same property.</p>
<p>To demonstrate their relationship, we introduce a new overlap objective function based on the between-cluster distances. To keep the computation reasonable, we simplify the function using an overlap measure. We then apply the new objective function within k-means and compare the experimental results of the new Overlap k-means against the standard k-means based on within-cluster distances. We design a k-means based algorithm for the new objective function. A localized variant is also considered for clusters with arbitrary shapes.</p>
<p>Our results are as follows. Between-cluster distances provide an alternative way to construct k-means with similar results but higher computational complexity. The proposed overlap measure addresses this problem by emphasizing the central points in the cluster. It has the advantage of providing more accurate centroid locations.</p>
<p>However, there is a drawback. The border points are important for two reasons. First, they allow centroids to travel from one cluster to another. Second, the far-away points play a significant role in pulling the centroids, enhancing their movement. The overlap k-means without this pulling force loses the dynamics of k-means and becomes too rigid.</p>
<p>The rest of the paper is organized as follows. We first discuss the properties of the SSE objective function in <xref ref-type="sec" rid="s2">Section 2</xref> and show the connection between the within (inner) and between (outer) cluster distances. We then form a k-means variant using the between-cluster distances in <xref ref-type="sec" rid="s3">Section 3</xref>. It has mainly theoretical interest, but we also show how it can be used to create a new localized objective function that can potentially detect arbitrary shapes. The experimental setup is defined in <xref ref-type="sec" rid="s4">Section 4</xref>, and results are given in <xref ref-type="sec" rid="s5">Section 5</xref>. Conclusions are drawn in <xref ref-type="sec" rid="s6">Section 6</xref>.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Properties of the Objective Function</title>
<p>The intuitive goal of clustering is to minimize the distances within the clusters and maximize those between the clusters. These can be measured by the following three quantities:
<list list-type="bullet">
<list-item>
<p>Sum of squared within-cluster distances (<italic>SSW</italic>)</p></list-item>
<list-item>
<p>The sum of squared between-cluster distances (<italic>SSB</italic>)</p></list-item>
<list-item>
<p>All pairwise (squared) distances (<italic>APD</italic>)</p></list-item>
</list></p>
<p>They can be calculated as follows:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>W</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>B</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2260;</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>j</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p><italic>APD</italic> is the sum of the other two:
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>=</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>W</mml:mi><mml:mo>+</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>B</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></disp-formula></p>
<p><italic>SSW</italic> and <italic>SSB</italic> depend on the clustering result, whereas <italic>APD</italic> is constant and depends only on the data. <italic>SSW</italic> can also be calculated for each cluster separately:
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>W</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula>where <italic>SSW</italic><sub><italic>a</italic></sub> denotes the sum of squared distances within cluster <italic>a</italic>:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>j</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>a</mml:mi></mml:math></disp-formula></p>
<sec id="s2_1">
<label>2.1</label>
<title>Use of SSW and SSB</title>
<p>SSW is widely used in agglomerative clustering by calculating the change (&#x0394;) in SSW if any pair of clusters <italic>a</italic> and <italic>b</italic> are merged:
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:mrow><mml:mi mathvariant="normal">&#x0394;</mml:mi></mml:mrow><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>Here, it is important to notice that the change equals the sum of squared distances between the clusters, <italic>SSB</italic><sub><italic>a&#x002B;b</italic></sub>, defined as follows:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>b</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>a</mml:mi><mml:mo>&#x2227;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>j</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>b</mml:mi></mml:math></disp-formula></p>
<p>In other words, while the algorithm aims to minimize <italic>SSW</italic>, it proceeds merely by evaluating the between-cluster values (<italic>SSB</italic>). <italic>SSW</italic> can also be normalized by calculating the sum of distances divided by the cluster size:
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:mrow><mml:mover><mml:mrow><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>W</mml:mi></mml:mrow><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:mfrac><mml:mrow><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mfrac></mml:math></disp-formula></p>
<p>This version is used in Ward&#x2019;s method and is shown to equal SSE [<xref ref-type="bibr" rid="ref-15">15</xref>]. The unnormalized version in <xref ref-type="disp-formula" rid="eqn-10">(10)</xref> has been shown to provide more balanced cluster sizes compared to SSE [<xref ref-type="bibr" rid="ref-29">29</xref>]. Average linkage clustering eliminates the cluster sizes completely from the equation by dividing by <italic>n</italic><sub><italic>a</italic></sub>&#x00B7;<italic>n</italic><sub><italic>b</italic></sub>. Its behavior is opposite to <xref ref-type="disp-formula" rid="eqn-10">(10)</xref> by creating more biased cluster sizes and favoring outlier clusters.</p>
<p>Normalized cut [<xref ref-type="bibr" rid="ref-19">19</xref>], cut ratio [<xref ref-type="bibr" rid="ref-20">20</xref>], and conductance [<xref ref-type="bibr" rid="ref-21">21</xref>] are all based on SSB but normalized in different ways. The ratio of SSW and SSB is used in [<xref ref-type="bibr" rid="ref-30">30</xref>], and their difference in [<xref ref-type="bibr" rid="ref-22">22</xref>]. Calinski and Harabasz [<xref ref-type="bibr" rid="ref-25">25</xref>] and WB-index [<xref ref-type="bibr" rid="ref-27">27</xref>] also use the ratio of SSW and SSB, but they also include <italic>c</italic> in the equation to allow comparison with different numbers of clusters. This is a useful variation when the number of clusters also needs to be solved.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Relationship between SSE and SSW</title>
<p>In the case of Euclidean distance, SSE is also directly related to SSW according to Huygens&#x2019;s theorem [<xref ref-type="bibr" rid="ref-29">29</xref>,<xref ref-type="bibr" rid="ref-31">31</xref>]:
<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula>where <italic>SSW</italic><sub><italic>a</italic></sub> and <italic>SSE</italic><sub><italic>a</italic></sub> refer to the <italic>SSW</italic> and <italic>SSE</italic> values in cluster <italic>a</italic>, and <italic>n</italic><sub><italic>a</italic></sub> its size. The main consequence of this relationship is that minimizing <italic>SSE</italic> and <italic>SSW</italic> within a cluster differs only by a scaling factor <italic>n</italic><sub><italic>a</italic></sub>. In other words, <italic>SSE</italic><sub><italic>a</italic></sub> sums up <italic>n</italic><sub><italic>a</italic></sub> squared distances, whereas SSW<sub><italic>a</italic></sub> sums up <italic>n</italic><sub><italic>a</italic></sub><sup>2</sup> distances. It is possible to normalize them into the same scale simply as <italic>SSE</italic><sub><italic>a</italic></sub> &#x003D; <italic>SSW</italic><sub><italic>a</italic></sub>/<italic>n</italic><sub><italic>a</italic></sub>.</p>
<p>Using <xref ref-type="disp-formula" rid="eqn-12">(12)</xref>, we can reformulate <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref> as:
<disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>B</mml:mi><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>W</mml:mi><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>Since <italic>APD</italic> is constant, regardless of the clustering, minimizing <italic>SSE</italic> (and <italic>SSW</italic>) is effectively the same as maximizing <italic>SSB</italic>. This implies that the objective function does not need to contain <italic>SSE</italic> or <italic>SSW</italic>, but <italic>SSB</italic> alone is sufficient.</p>
<p>If clusters are of equal sizes (<italic>n</italic><sub><italic>a</italic></sub> &#x003D; <italic>n</italic><sub><italic>b</italic></sub>, for all <italic>a</italic>, <italic>b</italic>), then it simplifies even further to:
<disp-formula id="eqn-14"><label>(14)</label><mml:math id="mml-eqn-14" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>B</mml:mi><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mi>n</mml:mi><mml:mi>c</mml:mi></mml:mfrac><mml:mo>&#x22C5;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi></mml:math></disp-formula></p>
<p><xref ref-type="fig" rid="fig-1">Fig. 1</xref> shows an example of two clusters with their corresponding SSW and SSB values.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Example of <italic>APD</italic> (left), <italic>SSW</italic> (middle), and <italic>SSB</italic> (right). There are O(<italic>n</italic><sup>2</sup>) links, but not all of them are drawn. The links have the following relationship: {<italic>APD</italic>} &#x003D; {<italic>SSW</italic>} <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mo>&#x222A;</mml:mo></mml:math></inline-formula> {<italic>SSB</italic>}</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-1.tif"/>
</fig>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Number of SSB Calculations</title>
<p>Motivated by the observations, we reformulate the k-means algorithm using between-cluster distances (<italic>SSB</italic>). However, this can be time-consuming because there are O(<italic>n</italic><sup>2</sup>) pairwise distances to be calculated at every iteration, which is too slow. An alternative solution is to store the O(<italic>n</italic><sup>2</sup>) size distance matrix, but this would reduce the practicality of the method due to quadratic memory consumption. Neither option looks very promising for scalability.</p>
<p>Fortunately, most SSB distances are between points located far away from each other, so they will almost never be assigned to the same cluster. In other words, they have no contribution to clustering. The distances that matter are points near each other so that they can sometimes belong to the same cluster depending on the operation of the algorithm. They contribute to the objective function most.</p>
<p>One possibility to make the method faster is to limit the distance calculations only between points in neighboring clusters. However, if the number of clusters is small (<italic>c</italic> &#x003C;&#x003C; <italic>n</italic>), almost all clusters are neighbors. This can also happen when the dimension increases high because the distances tend to become equidistant when using Euclidean (<italic>L</italic><sub>2</sub>) distance [<xref ref-type="bibr" rid="ref-32">32</xref>]. Minkowski distances (<italic>L</italic><sub>p</sub>) with other values of <italic>p</italic> have also been considered and L-norms with fractional values (0 &#x003C; <italic>p</italic> &#x003C; 1) have been shown to work better for high-dimensional data [<xref ref-type="bibr" rid="ref-33">33</xref>].</p>
<p>To demonstrate the problem, assume that the points are equally divided so that all clusters have size <italic>n</italic>/<italic>c</italic> points. In this case, there are (<italic>n</italic>/<italic>c</italic>)<sup>2</sup> distances between every pair of clusters. If we compute distances only between the nearest cluster, there would still be <italic>c</italic>&#x00B7;(<italic>n</italic>/<italic>c</italic>)<sup>2</sup> &#x003D; <italic>n</italic><sup>2</sup>/<italic>c</italic> distance calculations. If <italic>c</italic> &#x003D;<inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msqrt><mml:mi>n</mml:mi></mml:msqrt></mml:math></inline-formula>, the number of distance calculations becomes <italic>n</italic><sup>1.5</sup>, but when <italic>c</italic> is a small constant, <italic>c</italic> &#x003D; O(1), the time complexity remains O(<italic>n</italic><sup>2</sup>). See <xref ref-type="fig" rid="fig-2">Fig. 2</xref> for an example. In other words, we cannot afford to calculate all between-cluster distances if we want to keep the algorithm fast.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Total number of <italic>SSB</italic> calculations (280) and the number of calculations if only considering the nearest cluster (170)</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-2.tif"/>
</fig>
</sec>
<sec id="s2_4">
<label>2.4</label>
<title>Euclidean Distances</title>
<p>When minimizing sum-of-squared <italic>Euclidean</italic> distances, the calculations can be done more efficiently. From <xref ref-type="disp-formula" rid="eqn-12">(12)</xref>, we know that the sum of squared distances (<italic>SSE</italic>), multiplied by <italic>n</italic>, equals all pairwise distances within the clusters (<italic>SSW</italic>):
<disp-formula id="eqn-15"><label>(15)</label><mml:math id="mml-eqn-15" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>This is already utilized in k-means by using the centroids to calculate the within-cluster distances (<italic>SSW</italic>). However, the result also generalizes between-cluster distances as shown in [<xref ref-type="bibr" rid="ref-27">27</xref>,<xref ref-type="bibr" rid="ref-34">34</xref>].
<disp-formula id="eqn-16"><label>(16)</label><mml:math id="mml-eqn-16" display="block"><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mi>B</mml:mi><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi></mml:mrow><mml:mi>n</mml:mi></mml:mfrac><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>n</mml:mi></mml:mfrac><mml:mo>&#x22C5;</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mi>P</mml:mi><mml:mi>D</mml:mi><mml:mo>&#x2212;</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:munderover><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>In other words, both <italic>SSW</italic> and <italic>SSB</italic> can be done in O(<italic>n</italic>) time via SSE. In the following, we do not utilize this property as we are interested in overlap. This requires point-level information that would be lost if we used centroids to represent the clusters. However, this property can be beneficial for others, and thus, it is presented here.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Overlap k-Means (OK)</title>
<p>Among all the point pairs, the most meaningful ones are those that are near to each other but in different clusters. In other words, border pixels. In the proposed method, we, therefore, calculate only one distance per point to its nearest neighbor in another cluster. This distance is put into the context of its relative location in its own cluster.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Overlap Value</title>
<p>We formulate a so-called <italic>overlap value</italic> for each data point based on the overlap measure proposed in [<xref ref-type="bibr" rid="ref-35">35</xref>]. The overlap score for a point <italic>x</italic><sub>i</sub> is calculated as follows:
<disp-formula id="eqn-17"><label>(17)</label><mml:math id="mml-eqn-17" display="block"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mover><mml:mrow><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>where <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:mover><mml:mrow><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is the nearest neighbor of <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> in another cluster:
<disp-formula id="eqn-18"><label>(18)</label><mml:math id="mml-eqn-18" display="block"><mml:mover><mml:mrow><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mtext>argmin&#xA0;</mml:mtext></mml:mrow><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2260;</mml:mo><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>j</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>The lower the overlap value, the better the cluster assignment of the point. The new objective function then minimizes the sum of all overlap values in the data:
<disp-formula id="eqn-19"><label>(19)</label><mml:math id="mml-eqn-19" display="block"><mml:mi>O</mml:mi><mml:mi>v</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>The overlap value includes two terms. The first term (numerator) represents a sample of the <italic>SSW</italic> function, and the second term (divider) is a sample of the <italic>SSB</italic> function. The overlap is, therefore, a strongly sampled version of the Calinski and Harabasz measure [<xref ref-type="bibr" rid="ref-25">25</xref>] and closely related to other sum-of-squared based indexes [<xref ref-type="bibr" rid="ref-27">27</xref>]. The difference is that the overlap measure is not normalized by the cluster size.</p>
<p>Example calculations are shown in <xref ref-type="fig" rid="fig-3">Fig. 3</xref>, where the large cluster (gray points) has points near the small dense cluster (red points). While all border points have high distances to the centroids, only those near the red cluster have a high overlap value.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>The proposed objective function calculates the distance from a point only to its nearest neighbor in another cluster and to its own centroid</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-3.tif"/>
</fig>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>K-Means Using Overlap</title>
<p>K-means has two steps that should be updated according to the new objective function. Theoretically, the nearest cluster should be calculated by minimizing <xref ref-type="disp-formula" rid="eqn-16">(16)</xref>. However, we face computational problems. Finding the nearest neighbor point takes O(<italic>n</italic>) time for one point, and we have <italic>n</italic> points to process. The time complexity of the partition would, therefore, grow to O(<italic>n</italic><sup>2</sup>). To avoid this, we keep the original k-means assignment and find the nearest centroid.</p>
<p>The second step is to calculate the centroid for the clusters. We calculate the weighted average so that every point is inversely weighted by its overlap value. In this way, the border points with high overlap values will have less impact on the centroid location, which will move closer to the non-border points. The exact update rule is as follows:
<disp-formula id="eqn-20"><label>(20)</label><mml:math id="mml-eqn-20" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p><disp-formula id="eqn-21"><label>(21)</label><mml:math id="mml-eqn-21" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03B3;</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>]</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:mi>&#x03B3;</mml:mi></mml:math></inline-formula> is a (constant) bandwidth parameter. In other words, the calculation of the cluster centroid is an overlap-weighted average of the points belonging to the same cluster. The only difference to traditional k-means is the addition of the Step 2 (calculation of overlap). Pseudo code of the Overlap k-means is given in Algorithm 1.</p>
<fig id="fig-8">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-8.tif"/>
</fig>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Localized Variant</title>
<p>Despite the alternative formulation, Overlap k-means is merely another variant of k-means that optimizes essentially the same variables: minimizing SSW and maximizing SSB. The overlap score itself is localized regarding the SSB calculations by considering only the nearest neighbor in another cluster. The motivation was merely to reduce the calculations.</p>
<p>Next, we extend the localization to the SSW part by removing the dependency on the centroid. We want the overlap to be based only on local properties. To achieve this, we calculate a local neighborhood of a point defined by its <italic>k-nearest neighbors</italic> (KNN). <italic>Localized</italic> overlap value is then defined as:
<disp-formula id="eqn-22"><label>(22)</label><mml:math id="mml-eqn-22" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>M</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mover><mml:mrow><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo accent="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mi>M</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> denotes the distance of <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> to the mean of its <italic>KNN</italic> neighbors in the <italic>same cluster</italic>. It is calculated as follows:
<disp-formula id="eqn-23"><label>(23)</label><mml:math id="mml-eqn-23" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:mi>M</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo>&#x2208;</mml:mo><mml:munder><mml:mrow><mml:mi>K</mml:mi><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo>&#x005F;</mml:mo></mml:munder><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mi>k</mml:mi></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:munder><mml:mrow><mml:mi>K</mml:mi><mml:mi>N</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mo>&#x005F;</mml:mo></mml:munder><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the set of <italic>k</italic> nearest neighbors of <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> in the same cluster.</p>
<p>The divider is the same in both <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>, i.e., the distance to the nearest neighbor in another cluster. However, the numerator is different. In <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>, it depends on the local neighborhood alone no longer requires centroid. The overlap score <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> minimizes SSW, which implies spherical clusters, whereas <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:msub><mml:mi>O</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> minimizes <italic>Meanshift</italic>, which allows clusters with arbitrary non-convex shapes.</p>
<p>It is both an advantage and a disadvantage. The idea is that the higher the mean-shift distance, the more points differ from their neighborhoods. In specific, border points have high mean-shift values. This idea was originally developed for outlier detection in [<xref ref-type="bibr" rid="ref-36">36</xref>]. An example is shown in <xref ref-type="fig" rid="fig-4">Fig. 4</xref>. Pseudo code of the local variant is given in Algorithm 2.</p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Two points (blue) having the same distance to their cluster centroid (3.5), almost the same distance to the nearest point in another cluster (4.5 and 4.0), but with very different mean shift values (0.5 and 3.0)</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-4.tif"/>
</fig>
<fig id="fig-9">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-9.tif"/>
</fig>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experimental Setup</title>
<p>The datasets used in the experiments are listed in <xref ref-type="table" rid="table-1">Table 1</xref> and demonstrated in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>. We selected datasets from the clustering basic benchmark [<xref ref-type="bibr" rid="ref-35">35</xref>] and from [<xref ref-type="bibr" rid="ref-37">37</xref>]. The datasets have varying cluster overlaps, shapes, and densities.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Datasets used in the experiments</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Dataset</th>
<th>Reference</th>
<th>n</th>
<th>d</th>
<th>C</th>
</tr>
</thead>
<tbody>
<tr>
<td>Flame</td>
<td>[<xref ref-type="bibr" rid="ref-38">38</xref>]</td>
<td>240</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>Aggregation</td>
<td>[<xref ref-type="bibr" rid="ref-39">39</xref>]</td>
<td>788</td>
<td>2</td>
<td>7</td>
</tr>
<tr>
<td>S1</td>
<td>[<xref ref-type="bibr" rid="ref-40">40</xref>]</td>
<td>5000</td>
<td>2</td>
<td>15</td>
</tr>
<tr>
<td>S2</td>
<td>[<xref ref-type="bibr" rid="ref-40">40</xref>]</td>
<td>5000</td>
<td>2</td>
<td>15</td>
</tr>
<tr>
<td>S3</td>
<td>[<xref ref-type="bibr" rid="ref-40">40</xref>]</td>
<td>5000</td>
<td>2</td>
<td>15</td>
</tr>
<tr>
<td>S4</td>
<td>[<xref ref-type="bibr" rid="ref-40">40</xref>]</td>
<td>5000</td>
<td>2</td>
<td>15</td>
</tr>
<tr>
<td>A1</td>
<td>[<xref ref-type="bibr" rid="ref-34">34</xref>]</td>
<td>3000</td>
<td>2</td>
<td>20</td>
</tr>
<tr>
<td>A2</td>
<td>[<xref ref-type="bibr" rid="ref-34">34</xref>]</td>
<td>5250</td>
<td>2</td>
<td>35</td>
</tr>
<tr>
<td>A3</td>
<td>[<xref ref-type="bibr" rid="ref-34">34</xref>]</td>
<td>7500</td>
<td>2</td>
<td>50</td>
</tr>
<tr>
<td>Dim32</td>
<td>[<xref ref-type="bibr" rid="ref-18">18</xref>]</td>
<td>1024</td>
<td>32</td>
<td>16</td>
</tr>
<tr>
<td>Unbalance</td>
<td>[<xref ref-type="bibr" rid="ref-41">41</xref>]</td>
<td>6500</td>
<td>2</td>
<td>8</td>
</tr>
<tr>
<td>Birch1</td>
<td>[<xref ref-type="bibr" rid="ref-42">42</xref>]</td>
<td>100,000</td>
<td>2</td>
<td>100</td>
</tr>
<tr>
<td>Birch2</td>
<td>[<xref ref-type="bibr" rid="ref-42">42</xref>]</td>
<td>100,000</td>
<td>2</td>
<td>100</td>
</tr>
<tr>
<td>Birch3</td>
<td>[<xref ref-type="bibr" rid="ref-42">42</xref>]</td>
<td>100,000</td>
<td>2</td>
<td>100</td>
</tr>
<tr>
<td>Worms-2d</td>
<td>[<xref ref-type="bibr" rid="ref-37">37</xref>]</td>
<td>105,600</td>
<td>2</td>
<td>35</td>
</tr>
<tr>
<td>Worms-64d</td>
<td>[<xref ref-type="bibr" rid="ref-37">37</xref>]</td>
<td>105,600</td>
<td>64</td>
<td>25</td>
</tr>
</tbody>
</table>
</table-wrap><fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Visualization of the selected datasets. Some datasets are seemingly simple with regular structure (Birch<sub>1&#x2013;3</sub>), whereas others have challenges like varying cluster overlap (S1&#x2013;S4), density (Unbalance), or shapes (Worms-2D, Worms-64D)</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-5.tif"/>
</fig>
<p>We cluster the datasets with the following algorithms:
<list list-type="bullet">
<list-item>
<p>K-means (KM)</p></list-item>
<list-item>
<p>K-means&#x002B;&#x002B; (KM&#x002B;&#x002B;)</p></list-item>
<list-item>
<p>Random swap (RS)</p></list-item>
<list-item>
<p>Density peaks (DensP)</p></list-item>
<list-item>
<p>DBSCAN</p></list-item>
<list-item>
<p>Spectral clustering (Spectral)</p></list-item>
<list-item>
<p>Overlap k-means (OK)</p></list-item>
<list-item>
<p>Localized variant (OK-local)</p></list-item>
</list></p>
<p>K-means is the main point of comparison to see whether Overlap k-means provides similar clustering results to the standard k-means with the same seeding method. K-means itself can be improved by simple tricks like repeats and better seeding [<xref ref-type="bibr" rid="ref-43">43</xref>]. We, therefore, also tested the most popular seeding called K-means&#x002B;&#x002B; [<xref ref-type="bibr" rid="ref-44">44</xref>], which is based on a randomized further point heuristic.</p>
<p>We also include random swap [<xref ref-type="bibr" rid="ref-5">5</xref>], which is almost as simple as k-means and provides a state-of-the-art reference to how good clustering accuracy one can expect by minimizing SSE. It is one of the few clustering algorithms that find the correct cluster allocation for all the benchmark data. Other algorithms included are density peaks [<xref ref-type="bibr" rid="ref-45">45</xref>], DBSCAN [<xref ref-type="bibr" rid="ref-46">46</xref>,<xref ref-type="bibr" rid="ref-47">47</xref>], and spectral clustering [<xref ref-type="bibr" rid="ref-48">48</xref>].</p>
<p>We run all algorithms 100 times and report the average results, with the exceptions of Birch and Worms datasets, which are repeated only 10 times due to their higher processing times. Clustering results are measured by clustering accuracy (ACC) [<xref ref-type="bibr" rid="ref-49">49</xref>] and centroid index (CI) [<xref ref-type="bibr" rid="ref-50">50</xref>].</p>
<p>We have two main hypotheses to test: (1) Does OK provide similar results to k-means, and (2) can OK-local find clusters having non-uniform shapes and density?</p>
</sec>
<sec id="s5">
<label>5</label>
<title>Results</title>
<p>The main results are summarized in <xref ref-type="table" rid="table-2">Tables 2</xref> and <xref ref-type="table" rid="table-3">3</xref>. Good algorithms like Random swap and Density peaks can find correct clustering (CI &#x003D; 0) for most datasets. They only fail with the non-spherical datasets Birch3, Worms, and Aggregation, which cannot be clustered correctly by the SSE objective function. K-means&#x002B;&#x002B; manages to solve Dim32 and Unabalance, whereas K-means does not solve any of the datasets (average CI &#x003D; 5.8).</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Clustering results measured by centroid index (CI)<sup>&#x2193;</sup></title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th></th>
<th>S1</th>
<th>S2</th>
<th>S3</th>
<th>S4</th>
<th>A1</th>
<th>A2</th>
<th>A3</th>
<th>Dim32</th>
<th>Unb</th>
<th>B1</th>
<th>B2</th>
<th>B3</th>
<th>W2</th>
<th>W64</th>
<th>Agg</th>
<th align="center">Av</th>
</tr>
</thead>
<tbody>
<tr>
<td><bold>KM</bold></td>
<td>2.0</td>
<td>1.1</td>
<td>1.2</td>
<td>1.3</td>
<td>2.0</td>
<td>4.2</td>
<td>6.5</td>
<td>3.5</td>
<td>3.5</td>
<td>8.8</td>
<td>16.1</td>
<td>24</td>
<td>9.0</td>
<td>10.2</td>
<td>0.7</td>
<td style="background:#DEEAF6;"><bold>5.8</bold></td>
</tr>
<tr>
<td><bold>KM&#x002B;&#x002B;</bold></td>
<td>0.2</td>
<td>0.5</td>
<td>0.6</td>
<td>0.4</td>
<td>0.6</td>
<td>0.7</td>
<td>1.7</td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td>3.3</td>
<td>1.5</td>
<td>21</td>
<td>8.2</td>
<td>9.5</td>
<td>0.7</td>
<td style="background:#DEEAF6;"><bold>3.1</bold></td>
</tr>
<tr>
<td><bold>RS</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td>16</td>
<td>7.0</td>
<td>3.0</td>
<td>1.0</td>
<td style="background:#DEEAF6;"><bold>1.7</bold></td>
</tr>
<tr>
<td><bold>DensP</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td>21</td>
<td>8.0</td>
<td>3.0</td>
<td>1.0</td>
<td style="background:#DEEAF6;"><bold>2.1</bold></td>
</tr>
<tr>
<td><bold>DBSCAN</bold></td>
<td>11</td>
<td>9</td>
<td>18</td>
<td>22</td>
<td>12</td>
<td>20</td>
<td>28</td>
<td><bold>0.0</bold></td>
<td>1.0</td>
<td>11</td>
<td>5</td>
<td>38</td>
<td>9</td>
<td>11</td>
<td>2</td>
<td style="background:#DEEAF6;"><bold>12.4</bold></td>
</tr>
<tr>
<td><bold>Spectral</bold></td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td>0.4</td>
<td>1.1</td>
<td><bold>0.0</bold></td>
<td><bold>0.0</bold></td>
<td>0.3</td>
<td>1.2</td>
<td>2.1</td>
<td>1.0</td>
<td><bold>0.0</bold></td>
<td>18</td>
<td>6.0</td>
<td><bold>0.0</bold></td>
<td>2.0</td>
<td style="background:#DEEAF6;"><bold>2.1</bold></td>
</tr>
<tr>
<td><bold>OK</bold></td>
<td>2.3</td>
<td>2.3</td>
<td>2.5</td>
<td>2.2</td>
<td>2.9</td>
<td>6.0</td>
<td>7.5</td>
<td>4.0</td>
<td>4.0</td>
<td>12</td>
<td>20</td>
<td>31</td>
<td>11</td>
<td>11.3</td>
<td>1.8</td>
<td style="background:#DEEAF6;"><bold>7.6</bold></td>
</tr>
<tr>
<td><bold>OK-local</bold></td>
<td>2.1</td>
<td>1.2</td>
<td>1.3</td>
<td>0.9</td>
<td>2.5</td>
<td>4.7</td>
<td>5.6</td>
<td>3.7</td>
<td>4.0</td>
<td>8.3</td>
<td>16</td>
<td>24</td>
<td>8.0</td>
<td>9.9</td>
<td>1.0</td>
<td style="background:#DEEAF6;"><bold>5.8</bold></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-2fn1" fn-type="other">
<p>Note: Perfect clustering result (CI &#x003D; 0) is emphasized by boldface. Average results are shaded.</p>
</fn>
</table-wrap-foot>
</table-wrap><table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Clustering results measured by clustering accuracy (ACC)<sup>&#x2191;</sup> in %</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th></th>
<th>S1</th>
<th>S2</th>
<th>S3</th>
<th>S4</th>
<th>A1</th>
<th>A2</th>
<th>A3</th>
<th>Dim32</th>
<th>Unb</th>
<th>B1</th>
<th>B2</th>
<th>B3&#x002A;</th>
<th>W2</th>
<th>W64</th>
<th>Agg</th>
<th>Av</th>
</tr>
</thead>
<tbody>
<tr>
<td><bold>KM</bold></td>
<td>87</td>
<td>90</td>
<td>80</td>
<td>74</td>
<td>90</td>
<td>87</td>
<td>86</td>
<td>82</td>
<td>60</td>
<td>87</td>
<td>84</td>
<td>&#x2013;</td>
<td>51</td>
<td>52</td>
<td>82</td>
<td style="background:#DEEAF6;"><bold>74</bold></td>
</tr>
<tr>
<td><bold>KM&#x002B;&#x002B;</bold></td>
<td>98</td>
<td>94</td>
<td>83</td>
<td>78</td>
<td>97</td>
<td>98</td>
<td>96</td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td>95</td>
<td>98</td>
<td>&#x2013;</td>
<td>52</td>
<td>54</td>
<td>83</td>
<td style="background:#DEEAF6;"><bold>82</bold></td>
</tr>
<tr>
<td><bold>RS</bold></td>
<td>99</td>
<td>97</td>
<td>86</td>
<td>80</td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td>97</td>
<td>100</td>
<td>&#x2013;</td>
<td>52</td>
<td>76</td>
<td>83</td>
<td style="background:#DEEAF6;"><bold>85</bold></td>
</tr>
<tr>
<td><bold>DensP</bold></td>
<td>99</td>
<td>97</td>
<td>85</td>
<td>79</td>
<td>98</td>
<td>99</td>
<td>99</td>
<td>95</td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td><bold>100</bold></td>
<td>&#x2013;</td>
<td>55</td>
<td>74</td>
<td>86</td>
<td style="background:#DEEAF6;"><bold>85</bold></td>
</tr>
<tr>
<td><bold>DBSCAN</bold></td>
<td>95</td>
<td>77</td>
<td>56</td>
<td>58</td>
<td>88</td>
<td>84</td>
<td>85</td>
<td>91</td>
<td>98</td>
<td>78</td>
<td>68</td>
<td>&#x2013;</td>
<td>34</td>
<td>25</td>
<td>87</td>
<td style="background:#DEEAF6;"><bold>62</bold></td>
</tr>
<tr>
<td><bold>Spectral</bold></td>
<td>99</td>
<td>96</td>
<td>86</td>
<td>77</td>
<td>98</td>
<td>99</td>
<td>99</td>
<td>94</td>
<td>58</td>
<td>95</td>
<td><bold>100</bold></td>
<td>&#x2013;</td>
<td>52</td>
<td>85</td>
<td>74</td>
<td style="background:#DEEAF6;"><bold>81</bold></td>
</tr>
<tr>
<td><bold>OK</bold></td>
<td>83</td>
<td>82</td>
<td>74</td>
<td>71</td>
<td>84</td>
<td>82</td>
<td>84</td>
<td>75</td>
<td>58</td>
<td>83</td>
<td>78</td>
<td>&#x2013;</td>
<td>50</td>
<td>48</td>
<td>73</td>
<td style="background:#DEEAF6;"><bold>68</bold></td>
</tr>
<tr>
<td><bold>OK-local</bold></td>
<td>86</td>
<td>89</td>
<td>79</td>
<td>76</td>
<td>87</td>
<td>86</td>
<td>88</td>
<td>77</td>
<td>60</td>
<td>88</td>
<td>84</td>
<td>&#x2013;</td>
<td>52</td>
<td>53</td>
<td>83</td>
<td style="background:#DEEAF6;"><bold>73</bold></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-3fn1" fn-type="other">
<p>Note: &#x002A;Ground truth partitions are not available. Perfect clustering result (ACC &#x003D; 100%) is emphasized by boldface. Average results are shaded.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>Beyond the clustering accuracy, the interest here is more on the comparison between k-means (KM) and its overlap variant (OK). The results of these two are indeed similar, but there is a noticeable difference favoring k-means. The localized variant provides results closer to k-means. The corresponding average CI values are 5.8 (K-means), 7.6 (OK), and 5.8 (Local-OK).</p>
<p>Our first hypothesis was that Overlap k-means would provide similar results to k-means, but the results do not support it. We analyze the reasons in <xref ref-type="fig" rid="fig-6">Fig. 6</xref> with the S1 dataset, which is easy for good algorithms but troublesome for k-means due to small cluster overlap [<xref ref-type="bibr" rid="ref-35">35</xref>]. The results show that k-means can move all centroids to their correct location except two. Overlap k-means, however, performs even worse with four clusters unsolved.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>K-means and Overlap k-means result with S1 for the same initial solution (left). Overlap k-means positions the centroids better within the clusters but has problems locating them correctly globally. The CI-values of the solutions are CI &#x003D; 2 (k-means) and CI &#x003D; 4 (Overlap k-means) accordingly</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-6.tif"/>
</fig>
<p>The reason is studied in <xref ref-type="fig" rid="fig-7">Fig. 7</xref>, where the pulling effect of the faraway points attracts a centroid in just three iterations with k-means. However, the same does not happen with Overlap k-means. The reason is due to the low weight of the faraway points in the centroid calculation. This leads to nicely balanced locations of the centroids <italic>within</italic> the same cluster but leaving the one above empty.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>Snapshots of the bottom left corner of S1 after the 1st iteration, 3rd iteration, and the final solution. The pulling effect of the faraway points in k-means manages to move one of the centroids to the cluster missing a centroid. Overlap k-means gives less weight to the border points, which stabilizes the centroids close to their original location and makes the algorithm less dynamic</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_66534-fig-7.tif"/>
</fig>
<p>We conclude that it is possible to design k-means via the between-cluster distances, but the chosen design using the overlap is not good. It makes the algorithm practical by avoiding the overwhelming computations of the between-cluster distances, but it significantly reduces the pulling effect of the remote points, which is vital for k-means. In other words, the algorithm becomes too rigid and tends to get stuck in a local minimum. An effective algorithm should do the opposite: enhance the vital faraway boundary points instead of restricting their use.</p>
<p>The second hypothesis was that the localized variant could also work for non-spherical datasets. This does not happen either. The results of OK-local are closer to k-means than those of OK, but they do not perform any better with the non-spherical datasets (Birch3, Worms, and Aggregation). We cannot conclude whether the idea is not good enough or the potential is not fulfilled by the inferior local optimization.</p>
<p>We did not carry out further tests other than this proof-of-concept. The main contribution is theoretical, showing the connection between the within-cluster and between cluster distances. If one wants to achieve a better algorithm based on the overlap concept, we outline two potential ways to do it here.
<list list-type="simple">
<list-item><label>1.</label><p>Design a stochastic variant starting with the opposite: give high weight for the high overlap points. This would further enhance the dynamics of k-means, hopefully pushing the centroids even further than the standard SSE function would do. Then, decrease the weights and gradually converge to the Overlap k-means variant, which would focus on the central points.</p></list-item>
<list-item><label>2.</label><p>Replace k-means with a better local optimizer: random swap. This would completely avoid the problem of local minima. If there are any benefits of the OK or OK-local, their random swap counterparts have a higher potential to exploit them.</p></list-item>
</list></p>
</sec>
<sec id="s6">
<label>6</label>
<title>Conclusions</title>
<p>We have the following conclusions:</p>
<p>First, within-cluster (SSW) and between-cluster distances (SSB) measure essentially the same quantity and do not offer any complementary information. K-means uses the sum-of-squared (SSE) objective function, which is essentially a scaled version of SSW. We have shown that the same objective can be constructed using between-cluster distances.</p>
<p>Second, if we calculate the centroids for the data, both approaches can be calculated in O(<italic>n</italic>) time [<xref ref-type="bibr" rid="ref-27">27</xref>,<xref ref-type="bibr" rid="ref-34">34</xref>]. Otherwise, we need to calculate all pairwise distances. Within-cluster distances (SSW) take <italic>k</italic>&#x00B7;(<italic>n</italic>/<italic>k</italic>)<sup>2</sup> &#x003D; O(<italic>n</italic><sup>2</sup>/<italic>k</italic>) time in case of balanced cluster sizes. Between-cluster distances, on the other hand, require the calculation of all pairwise distances in the entire data, which leads to O(<italic>n</italic><sup>2</sup>) time complexity.</p>
<p>Third, Calinski&#x2013;Harabasz, silhouette score, WB-index, and DBI and most other internal indexes assume that both the within-cluster and between-cluster variances are needed. This paper demonstrates that this is not the case. The consequence is that all these indexes are heuristics based on wrong assumption, which implies that a better approach should be designed based on a different principle.</p>
<p>Fourth, we presented a new algorithm called overlap k-means (OK), which utilizes between-cluster distances. Instead of minimizing all distances, it focuses on the distances near the cluster borders. However, this construction lost the dynamics of the k-means algorithm, leading to a more rigid algorithm behavior. The results of the localized variant were more consistent with that of k-means.</p>
<p>Fifth, the overlap idea has further potential. We outlined two possibilities. The first one would be a stochastic variant, which would emphasize the border points more in the beginning and gradually reduce their effect, leading to the Overlap k-means. The second possibility would be simply to replace the inferior k-means with a more robust random swap algorithm. These two are points for future studies.</p>
</sec>
</body>
<back>
<ack>
<p>We thank Fei Wang and Le Li for their help.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>The authors received no specific funding for this study.</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>Study conception and design: Pasi Fr&#x00E4;nti; theoretical part: Pasi Fr&#x00E4;nti and Qinpei Zhao; algorithm design and experiments: Claude Cariou; analysis and interpretation of results: Pasi Fr&#x00E4;nti and Claude Cariou; draft manuscript preparation: Pasi Fr&#x00E4;nti and Claude Cariou. All authors reviewed the results and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The source code and the datasets generated during and/or analyzed during the current study are available in the <ext-link ext-link-type="uri" xlink:href="https://cs.uef.fi/ml/software/">https://cs.uef.fi/ml/software/</ext-link>, <ext-link ext-link-type="uri" xlink:href="https://cs.uef.fi/sipu/datasets/">https://cs.uef.fi/sipu/datasets/</ext-link> (accessed on 05 September 2025).</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest to report regarding the present study.</p>
</sec>
<app-group id="appg-1">
<app id="app-1">
<title>Appendix A: Pseudo Code of the Overlap k-Means</title>
<p>X &#x003D; dataset</p>
<p>K &#x003D; Size of KNN</p>
<p>NN &#x003D; Nearest neighbors</p>
<p>NC &#x003D; number of clusters</p>
<p>PerformOK(X, NC, K)</p>
<p>{</p>
<p>/&#x002A; initial solution &#x002A;/</p>
<p>NN: &#x003D; FindKNN(X,K);</p>
<p>C: &#x003D; SelectRandomRepresentatives(X,NC);</p>
<p>P: &#x003D; OptimalPartition(C,X);</p>
<p>P_old: &#x003D; zeros(size(P));</p>
<p>O: &#x003D; Overlap-v1(P,X,NN,C);</p>
<p>gamma &#x003D; Mean(O);</p>
<p>WHILE P &#x003C;&#x003E; P_old</p>
<p>{</p>
<p>P_old &#x003D; P;</p>
<p>(P,C,O): &#x003D; OK-means(P,C,X,O,NN,gamma);</p>
<p>}</p>
<p>RETURN (P,C,O);</p>
<p>}</p>
<p>OK-means(P,C,X,O,NN,gamma)</p>
<p>{</p>
<p>/&#x002A; performs one K-means iteration with KNN-overlap weighting &#x002A;/</p>
<p>C: &#x003D; OptimalRepresentatives_w_Overlap(P,X,O,gamma);</p>
<p>P: &#x003D; OptimalPartition(C,X);</p>
<p>O: &#x003D; Overlap-v1(P,X,NN,C);</p>
<p>RETURN (P,C,O);</p>
<p>}</p>
<p>OptimalPartition(C,X)</p>
<p>{</p>
<p>FOR i: &#x003D; 1 TO N DO</p>
<p>{</p>
<p>P[i]: &#x003D; FindNearestRepresentative(C,X[i]);</p>
<p>}</p>
<p>RETURN P;</p>
<p>}</p>
<p>FindNearestRepresentative(C,x)</p>
<p>{</p>
<p>j: &#x003D; 1;</p>
<p>FOR i: &#x003D; 2 TO k DO</p>
<p>{</p>
<p>IF Dist(x,C[i]) &#x003C; Dist(x,C[j]) THEN</p>
<p>{</p>
<p>j: &#x003D; i;</p>
<p>}</p>
<p>}</p>
<p>RETURN j;</p>
<p>}</p>
<p>Overlap-v1(P,X,NN,C)</p>
<p>{</p>
<p>FOR i: &#x003D; 1 TO N DO</p>
<p>{</p>
<p>B: &#x003D; NN[i];</p>
<p>Q: &#x003D; Points in X with label P[i];</p>
<p>T: &#x003D; B &#x2229; (X \ Q) /&#x002A;The nearest neighbors having a different label</p>
<p>D2: &#x003D; SmallestDistance(T,X[i]); /&#x002A;Smallest distance between X[i] and T&#x002A;/</p>
<p>D1: &#x003D; Dist(X[i],C[P[i]]); /&#x002A;Dist. between X[i] and its centroid&#x002A;/</p>
<p>O[i]: &#x003D; D1/D2; /&#x002A;Overlap cost&#x002A;/</p>
<p>}</p>
<p>RETURN O;</p>
<p>}</p>
<p>OptimalRepresentatives_w_Overlap(P,X,O,gamma)</p>
<p>{</p>
<p>/&#x002A; initialize Sum[1..k] and Count[1..k] by zero values! &#x002A;/</p>
<p>/&#x002A; sum vector and count for each partition &#x002A;/</p>
<p>FOR i: &#x003D; 1 TO N DO</p>
<p>{</p>
<p>j: &#x003D; P[i];</p>
<p>Sum[j]: &#x003D; Sum[j] &#x002B; X[i]&#x002A;exp(-(O[i]/gamma)&#x002A;&#x002A;2);</p>
<p>Count[j]: &#x003D; Count[j] &#x002B; exp(-(O[i]/gamma)&#x002A;&#x002A;2);</p>
<p>}</p>
<p>/&#x002A; optimal representatives are average vectors &#x002A;/</p>
<p>FOR i: &#x003D; 1 TO k DO</p>
<p>{</p>
<p>IF Count[i] &#x003C;&#x003E; 0 THEN</p>
<p>{</p>
<p>C[i]: &#x003D; Sum[i]/Count[i];</p>
<p>}</p>
<p>}</p>
<p>RETURN C;</p>
<p>}</p>
<p>SmallestDistance(Data,Query)</p>
<p>{</p>
<p>Dmin: &#x003D; some large positive value;</p>
<p>FOR i: &#x003D; 1 TO N DO</p>
<p>{</p>
<p>D: &#x003D; Dist(Data[i],Query);</p>
<p>IF D &#x003C; Dmin THEN</p>
<p>{</p>
<p>Dmin: &#x003D; D;</p>
<p>}</p>
<p>}</p>
<p>RETURN Dmin;</p>
<p>}</p>
<p>AvgDistance(D)</p>
<p>{</p>
<p>Sum &#x003D; 0;</p>
<p>FOR i: &#x003D; 1 TO K DO</p>
<p>{</p>
<p>Sum &#x003D; Sum &#x002B; D[i];</p>
<p>}</p>
<p>Davg: &#x003D; Sum/K;</p>
<p>RETURN Davg;</p>
<p>}</p>
</app>
</app-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Forgy</surname> <given-names>E</given-names></string-name></person-group>. <article-title>Cluster analysis of multivariate data: efficiency vs. interpretability of classification</article-title>. <source>Biometrics</source>. <year>1965</year>;<volume>21</volume>:<fpage>768</fpage>&#x2013;<lpage>80</lpage>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>MacQueen</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Some methods for classification and analysis of multivariate observations</article-title>. In: <conf-name>Berkeley Symposium on Mathematical Statistics and Probability; 1965 Jun 21&#x2013;Jul 18</conf-name>; <publisher-loc>Berkeley, CA, USA</publisher-loc>. p. <fpage>281</fpage>&#x2013;<lpage>97</lpage>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lloyd</surname> <given-names>S</given-names></string-name></person-group>. <article-title>Least squares quantization in PCM</article-title>. <source>IEEE Trans Inf Theory</source>. <year>1982</year>;<volume>28</volume>(<issue>2</issue>):<fpage>129</fpage>&#x2013;<lpage>37</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TIT.1982.1056489</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Genetic algorithms for large-scale clustering problems</article-title>. <source>Comput J</source>. <year>1997</year>;<volume>40</volume>(<issue>9</issue>):<fpage>547</fpage>&#x2013;<lpage>54</lpage>. doi:<pub-id pub-id-type="doi">10.1093/comjnl/40.9.547</pub-id>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Efficiency of random swap clustering</article-title>. <source>J Big Data</source>. <year>2018</year>;<volume>5</volume>(<issue>1</issue>):<fpage>13</fpage>. doi:<pub-id pub-id-type="doi">10.1186/s40537-018-0122-y</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Malinen</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Mariescu-Istodor</surname> <given-names>R</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>K-means: clustering by gradual data transformation</article-title>. <source>Pattern Recognit</source>. <year>2014</year>;<volume>47</volume>(<issue>10</issue>):<fpage>3376</fpage>&#x2013;<lpage>86</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2014.03.034</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Fritzke</surname> <given-names>B</given-names></string-name></person-group>. <article-title>Breathing k-means. arXiv:2006.15666. 2020</article-title>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lee</surname> <given-names>J</given-names></string-name>, <string-name><surname>Perkins</surname> <given-names>D</given-names></string-name></person-group>. <article-title>A simulated annealing algorithm with a dual perturbation method for clustering</article-title>. <source>Pattern Recognit</source>. <year>2021</year>;<volume>112</volume>(<issue>4</issue>):<fpage>107713</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2020.107713</pub-id>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Baldassi</surname> <given-names>C</given-names></string-name></person-group>. <article-title>Recombinator-k-means: an evolutionary algorithm that exploits k-means for recombination</article-title>. <source>IEEE Trans Evol Comput</source>. <year>2022</year>;<volume>26</volume>(<issue>5</issue>):<fpage>991</fpage>&#x2013;<lpage>1003</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TEVC.2022.3144134</pub-id>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Mariescu-Istodor</surname> <given-names>R</given-names></string-name></person-group>. <article-title>Averaging GPS segments competition 2019</article-title>. <source>Pattern Recognit</source>. <year>2021</year>;<volume>112</volume>(<issue>2</issue>):<fpage>107730</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2020.107730</pub-id>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Malinen</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Clustering by analytic functions</article-title>. <source>Inf Sci</source>. <year>2012</year>;<volume>217</volume>:<fpage>31</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.ins.2012.06.018</pub-id>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Nie</surname> <given-names>F</given-names></string-name>, <string-name><surname>Xue</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wu</surname> <given-names>D</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>R</given-names></string-name>, <string-name><surname>Li</surname> <given-names>H</given-names></string-name>, <string-name><surname>Li</surname> <given-names>X</given-names></string-name></person-group>. <article-title>Coordinate descent method for <italic>k</italic>k-means</article-title>. <source>IEEE Trans Pattern Anal Mach Intell</source>. <year>2022</year>;<volume>44</volume>(<issue>5</issue>):<fpage>2371</fpage>&#x2013;<lpage>85</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TPAMI.2021.3085739</pub-id>; <pub-id pub-id-type="pmid">34061737</pub-id></mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Qu</surname> <given-names>F</given-names></string-name>, <string-name><surname>Shi</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Hu</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Coordinate descent K-means algorithm based on split-merge</article-title>. <source>Comput Mater Contin</source>. <year>2024</year>;<volume>81</volume>(<issue>3</issue>):<fpage>4875</fpage>&#x2013;<lpage>93</lpage>. doi:<pub-id pub-id-type="doi">10.32604/cmc.2024.060090</pub-id>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ward</surname> <given-names>JH</given-names>
<suffix>Jr</suffix></string-name></person-group>. <article-title>Hierarchical grouping to optimize an objective function</article-title>. <source>J Am Stat Assoc</source>. <year>1963</year>;<volume>58</volume>(<issue>301</issue>):<fpage>236</fpage>&#x2013;<lpage>44</lpage>. doi:<pub-id pub-id-type="doi">10.1080/01621459.1963.10500845</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Equitz</surname> <given-names>WH</given-names></string-name></person-group>. <article-title>A new vector quantization clustering algorithm</article-title>. <source>IEEE Trans Acoust Speech Signal Process</source>. <year>1989</year>;<volume>37</volume>(<issue>10</issue>):<fpage>1568</fpage>&#x2013;<lpage>75</lpage>. doi:<pub-id pub-id-type="doi">10.1109/29.35395</pub-id>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Shanbehzadeh</surname> <given-names>J</given-names></string-name>, <string-name><surname>Ogunbona</surname> <given-names>PO</given-names></string-name></person-group>. <article-title>On the computational complexity of the LBG and PNN algorithms</article-title>. <source>IEEE Trans Image Process</source>. <year>1997</year>;<volume>6</volume>(<issue>4</issue>):<fpage>614</fpage>&#x2013;<lpage>6</lpage>. doi:<pub-id pub-id-type="doi">10.1109/83.563327</pub-id>; <pub-id pub-id-type="pmid">18282955</pub-id></mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Kaukoranta</surname> <given-names>T</given-names></string-name>, <string-name><surname>Shen</surname> <given-names>DF</given-names></string-name>, <string-name><surname>Chang</surname> <given-names>KS</given-names></string-name></person-group>. <article-title>Fast and memory efficient implementation of the exact PNN</article-title>. <source>IEEE Trans Image Process</source>. <year>2000</year>;<volume>9</volume>(<issue>5</issue>):<fpage>773</fpage>&#x2013;<lpage>7</lpage>. doi:<pub-id pub-id-type="doi">10.1109/83.841516</pub-id>; <pub-id pub-id-type="pmid">18255449</pub-id></mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Virmajoki</surname> <given-names>O</given-names></string-name>, <string-name><surname>Hautam&#x00E4;ki</surname> <given-names>V</given-names></string-name></person-group>. <article-title>Fast agglomerative clustering using a k-nearest neighbor graph</article-title>. <source>IEEE Trans Pattern Anal Mach Intell</source>. <year>2006</year>;<volume>28</volume>(<issue>11</issue>):<fpage>1875</fpage>&#x2013;<lpage>81</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TPAMI.2006.227</pub-id>; <pub-id pub-id-type="pmid">17063692</pub-id></mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Shi</surname> <given-names>J</given-names></string-name>, <string-name><surname>Malik</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Normalized cuts and image segmentation</article-title>. <source>IEEE Trans Pattern Anal Mach Intell</source>. <year>2000</year>;<volume>22</volume>(<issue>8</issue>):<fpage>888</fpage>&#x2013;<lpage>905</lpage>. doi:<pub-id pub-id-type="doi">10.1109/34.868688</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hagen</surname> <given-names>L</given-names></string-name>, <string-name><surname>Kahng</surname> <given-names>AB</given-names></string-name></person-group>. <article-title>New spectral methods for ratio cut partitioning and clustering</article-title>. <source>IEEE Trans Comput Aided Des Integr Circuits Syst</source>. <year>1992</year>;<volume>11</volume>(<issue>9</issue>):<fpage>1074</fpage>&#x2013;<lpage>85</lpage>. doi:<pub-id pub-id-type="doi">10.1109/43.159993</pub-id>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Leskovec</surname> <given-names>J</given-names></string-name>, <string-name><surname>Lang</surname> <given-names>KJ</given-names></string-name>, <string-name><surname>Mahoney</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Empirical comparison of algorithms for network community detection</article-title>. In: <conf-name>Proceedings of the 19th International Conference on World Wide Web; 2010 Apr 26&#x2013;30</conf-name>. <publisher-loc>Raleigh, NC, USA</publisher-loc>. p. <fpage>631</fpage>&#x2013;<lpage>40</lpage>. doi:<pub-id pub-id-type="doi">10.1145/1772690.1772755</pub-id>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Newman</surname> <given-names>MEJ</given-names></string-name>, <string-name><surname>Girvan</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Finding and evaluating community structure in networks</article-title>. <source>Phys Rev E</source>. <year>2004</year>;<volume>69</volume>(<issue>2</issue>):<fpage>026113</fpage>. doi:<pub-id pub-id-type="doi">10.1103/physreve.69.026113</pub-id>; <pub-id pub-id-type="pmid">14995526</pub-id></mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Sieranoja</surname> <given-names>S</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Adapting k-means for graph clustering</article-title>. <source>Knowl Inf Syst</source>. <year>2022</year>;<volume>64</volume>(<issue>1</issue>):<fpage>115</fpage>&#x2013;<lpage>42</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s10115-021-01623-y</pub-id>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Cohen-Addad</surname> <given-names>V</given-names></string-name>, <string-name><surname>Kanade</surname> <given-names>V</given-names></string-name>, <string-name><surname>Mallmann-Trenn</surname> <given-names>F</given-names></string-name>, <string-name><surname>Mathieu</surname> <given-names>C</given-names></string-name></person-group>. <article-title>Hierarchical clustering: objective functions and algorithms</article-title>. <source>J ACM</source>. <year>2019</year>;<volume>66</volume>(<issue>4</issue>):<fpage>26</fpage>. doi:<pub-id pub-id-type="doi">10.1137/1.9781611975031.26</pub-id>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Calinski</surname> <given-names>T</given-names></string-name>, <string-name><surname>Harabasz</surname> <given-names>J</given-names></string-name></person-group>. <article-title>A dendrite method for cluster analysis</article-title>. <source>Commun Stat Simul Comput</source>. <year>1974</year>;<volume>3</volume>(<issue>1</issue>):<fpage>791519860</fpage>. doi:<pub-id pub-id-type="doi">10.1080/03610917408548446</pub-id>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Rousseeuw</surname> <given-names>PJ</given-names></string-name></person-group>. <article-title>Silhouettes: a graphical aid to the interpretation and validation of cluster analysis</article-title>. <source>J Comput Appl Math</source>. <year>1987</year>;<volume>20</volume>:<fpage>53</fpage>&#x2013;<lpage>65</lpage>. doi:<pub-id pub-id-type="doi">10.1016/0377-0427(87)90125-7</pub-id>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhao</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>WB-index: a sum-of-squares based index for cluster validity</article-title>. <source>Data Knowl Eng</source>. <year>2014</year>;<volume>92</volume>:<fpage>77</fpage>&#x2013;<lpage>89</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.datak.2014.07.008</pub-id>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>J</given-names></string-name>, <string-name><surname>Jauhiainen</surname> <given-names>S</given-names></string-name>, <string-name><surname>K&#x00E4;rkk&#x00E4;inen</surname> <given-names>T</given-names></string-name></person-group>. <article-title>Comparison of internal clustering validation indices for prototype-based clustering</article-title>. <source>Algorithms</source>. <year>2017</year>;<volume>10</volume>(<issue>3</issue>):<fpage>105</fpage>. doi:<pub-id pub-id-type="doi">10.3390/a10030105</pub-id>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Malinen</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>All-pairwise squared distances lead to more balanced clustering</article-title>. <source>Appl Comput Intell</source>. <year>2023</year>;<volume>3</volume>(<issue>1</issue>):<fpage>93</fpage>&#x2013;<lpage>115</lpage>. doi:<pub-id pub-id-type="doi">10.3934/aci.2023006</pub-id>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Bubeck</surname> <given-names>S</given-names></string-name>, <string-name><surname>von Luxburg</surname> <given-names>U</given-names></string-name></person-group>. <article-title>Nearest neighbor clustering: a baseline method for consistent clustering with arbitrary objective functions</article-title>. <source>J Mach Learn Res</source>. <year>2009</year>;<volume>10</volume>:<fpage>657</fpage>&#x2013;<lpage>98</lpage>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Aloise</surname> <given-names>D</given-names></string-name>, <string-name><surname>Deshpande</surname> <given-names>A</given-names></string-name>, <string-name><surname>Hansen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Popat</surname> <given-names>P</given-names></string-name></person-group>. <article-title>NP-hardness of Euclidean sum-of-squares clustering</article-title>. <source>Mach Learn</source>. <year>2009</year>;<volume>75</volume>(<issue>2</issue>):<fpage>245</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s10994-009-5103-0</pub-id>.</mixed-citation></ref>
<ref id="ref-32"><label>[32]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Beyer</surname> <given-names>K</given-names></string-name>, <string-name><surname>Goldstein</surname> <given-names>J</given-names></string-name>, <string-name><surname>Ramakrishnan</surname> <given-names>R</given-names></string-name>, <string-name><surname>Shaft</surname> <given-names>U</given-names></string-name></person-group>. <chapter-title>When is &#x201C;nearest neighbor&#x201D; meaningful?</chapter-title> In: <article-title>International Conference on Database Theory; 1999 Jan 10&#x2013;12</article-title>; <publisher-loc>Jerusalem, Israel. Berlin/Heidelberg, Germany</publisher-loc>: <publisher-name>Springer</publisher-name>; <year>1999</year>. p. <fpage>217</fpage>&#x2013;<lpage>35</lpage>. doi:<pub-id pub-id-type="doi">10.1007/3-540-49257-7_15</pub-id>.</mixed-citation></ref>
<ref id="ref-33"><label>[33]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Aggarwal</surname> <given-names>CC</given-names></string-name>, <string-name><surname>Hinneburg</surname> <given-names>A</given-names></string-name>, <string-name><surname>Keim</surname> <given-names>DA</given-names></string-name></person-group>. <article-title>On the surprising behavior of distance metrics in high dimensional space</article-title>. In: <conf-name>International Conference on Database Theory (ICDT&#x2019;01); 2001 Jan 4&#x2013;6</conf-name>; <publisher-loc>London, UK. Berlin/Heidelberg, Germany</publisher-loc>: <publisher-name>Springer-Verlag</publisher-name>; <year>2001</year>. p. <fpage>420</fpage>&#x2013;<lpage>34</lpage>. doi:<pub-id pub-id-type="doi">10.1007/3-540-44503-x_27</pub-id>.</mixed-citation></ref>
<ref id="ref-34"><label>[34]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><surname>K&#x00E4;rkk&#x00E4;inen</surname> <given-names>I</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <source>Dynamic local search algorithm for the clustering problem</source>. <publisher-loc>Joensuu, Finland</publisher-loc>: <publisher-name>University of Joensuu</publisher-name>; <year>2002</year>. <comment>Report No.: A-2002-6.</comment></mixed-citation></ref>
<ref id="ref-35"><label>[35]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Sieranoja</surname> <given-names>S</given-names></string-name></person-group>. <article-title>K-means properties on six clustering benchmark datasets</article-title>. <source>Appl Intell</source>. <year>2018</year>;<volume>48</volume>(<issue>12</issue>):<fpage>4743</fpage>&#x2013;<lpage>59</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s10489-018-1238-7</pub-id>.</mixed-citation></ref>
<ref id="ref-36"><label>[36]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Yang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Rahardja</surname> <given-names>S</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Mean-shift outlier detection and filtering</article-title>. <source>Pattern Recognit</source>. <year>2021</year>;<volume>115</volume>(<issue>406&#x2013;21</issue>):<fpage>107874</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2021.107874</pub-id>.</mixed-citation></ref>
<ref id="ref-37"><label>[37]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Sieranoja</surname> <given-names>S</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Fast and general density peaks clustering</article-title>. <source>Pattern Recognit Lett</source>. <year>2019</year>;<volume>128</volume>(<issue>3&#x2013;5</issue>):<fpage>551</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patrec.2019.10.019</pub-id>.</mixed-citation></ref>
<ref id="ref-38"><label>[38]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fu</surname> <given-names>L</given-names></string-name>, <string-name><surname>Medico</surname> <given-names>E</given-names></string-name></person-group>. <article-title>FLAME, a novel fuzzy clustering method for the analysis of DNA microarray data</article-title>. <source>BMC Bioinform</source>. <year>2007</year>;<volume>8</volume>(<issue>1</issue>):<fpage>3</fpage>. doi:<pub-id pub-id-type="doi">10.1186/1471-2105-8-3</pub-id>; <pub-id pub-id-type="pmid">17204155</pub-id></mixed-citation></ref>
<ref id="ref-39"><label>[39]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Gionis</surname> <given-names>A</given-names></string-name>, <string-name><surname>Mannila</surname> <given-names>H</given-names></string-name>, <string-name><surname>Tsaparas</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Clustering aggregation</article-title>. <source>ACM Trans Knowl Discov Data</source>. <year>2007</year>;<volume>1</volume>(<issue>1</issue>):<fpage>4</fpage>. doi:<pub-id pub-id-type="doi">10.1145/1217299.1217303</pub-id>.</mixed-citation></ref>
<ref id="ref-40"><label>[40]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Virmajoki</surname> <given-names>O</given-names></string-name></person-group>. <article-title>Iterative shrinking method for clustering problems</article-title>. <source>Pattern Recognit</source>. <year>2006</year>;<volume>39</volume>(<issue>5</issue>):<fpage>761</fpage>&#x2013;<lpage>75</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2005.09.012</pub-id>.</mixed-citation></ref>
<ref id="ref-41"><label>[41]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Rezaei</surname> <given-names>M</given-names></string-name>, <string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Set matching measures for external cluster validity</article-title>. <source>IEEE Trans Knowl Data Eng</source>. <year>2016</year>;<volume>28</volume>(<issue>8</issue>):<fpage>2173</fpage>&#x2013;<lpage>86</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TKDE.2016.2551240</pub-id>.</mixed-citation></ref>
<ref id="ref-42"><label>[42]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhang</surname> <given-names>T</given-names></string-name>, <string-name><surname>Ramakrishnan</surname> <given-names>R</given-names></string-name>, <string-name><surname>Livny</surname> <given-names>M</given-names></string-name></person-group>. <article-title>BIRCH: a new data clustering algorithm and its applications</article-title>. <source>Data Min Knowl Discov</source>. <year>1997</year>;<volume>1</volume>(<issue>2</issue>):<fpage>141</fpage>&#x2013;<lpage>82</lpage>. doi:<pub-id pub-id-type="doi">10.1023/A:1009783824328</pub-id>.</mixed-citation></ref>
<ref id="ref-43"><label>[43]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Sieranoja</surname> <given-names>S</given-names></string-name></person-group>. <article-title>How much can k-means be improved by using better initialization and repeats?</article-title> <source>Pattern Recognit</source>. <year>2019</year>;<volume>93</volume>(<issue>2</issue>):<fpage>95</fpage>&#x2013;<lpage>112</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2019.04.014</pub-id>.</mixed-citation></ref>
<ref id="ref-44"><label>[44]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Arthur</surname> <given-names>D</given-names></string-name>, <string-name><surname>Vassilvitskii</surname> <given-names>S</given-names></string-name></person-group>. <article-title>K-means&#x002B;&#x002B;: the advantages of careful seeding</article-title>. In: <conf-name>ACM-SIAM Symposium on Discrete Algorithms (SODA&#x2019;07); 2007 Jan 7&#x2013;9</conf-name>; <publisher-loc>New Orleans, LA, USA</publisher-loc>. </mixed-citation></ref>
<ref id="ref-45"><label>[45]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Rodriguez</surname> <given-names>A</given-names></string-name>, <string-name><surname>Laio</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Machine learning. Clustering by fast search and find of density peaks</article-title>. <source>Science</source>. <year>2014</year>;<volume>344</volume>(<issue>6191</issue>):<fpage>1492</fpage>&#x2013;<lpage>6</lpage>. doi:<pub-id pub-id-type="doi">10.1126/science.1242072</pub-id>; <pub-id pub-id-type="pmid">24970081</pub-id></mixed-citation></ref>
<ref id="ref-46"><label>[46]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ester</surname> <given-names>M</given-names></string-name>, <string-name><surname>Kriegel</surname> <given-names>HP</given-names></string-name>, <string-name><surname>Sander</surname> <given-names>J</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>X</given-names></string-name></person-group>. <article-title>A density-based algorithm for discovering clusters in large spatial databases with noise</article-title>. <source>KDD</source>. <year>1996</year>;<volume>96</volume>(<issue>34</issue>):<fpage>226</fpage>&#x2013;<lpage>31</lpage>.</mixed-citation></ref>
<ref id="ref-47"><label>[47]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Schubert</surname> <given-names>E</given-names></string-name>, <string-name><surname>Sander</surname> <given-names>J</given-names></string-name>, <string-name><surname>Ester</surname> <given-names>M</given-names></string-name>, <string-name><surname>Kriegel</surname> <given-names>HP</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>X</given-names></string-name></person-group>. <article-title>DBSCAN revisited, revisited: why and how you should (still) use DBSCAN</article-title>. <source>ACM Trans Database Syst</source>. <year>2017</year>;<volume>42</volume>(<issue>3</issue>):<fpage>1</fpage>&#x2013;<lpage>21</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3068335</pub-id>.</mixed-citation></ref>
<ref id="ref-48"><label>[48]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>von Luxburg</surname> <given-names>U</given-names></string-name></person-group>. <article-title>A tutorial on spectral clustering</article-title>. <source>Stat Comput</source>. <year>2007</year>;<volume>17</volume>(<issue>4</issue>):<fpage>395</fpage>&#x2013;<lpage>416</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s11222-007-9033-z</pub-id>.</mixed-citation></ref>
<ref id="ref-49"><label>[49]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Sieranoja</surname> <given-names>S</given-names></string-name></person-group>. <article-title>Clustering accuracy</article-title>. <source>Appl Comput Intell</source>. <year>2024</year>;<volume>4</volume>(<issue>1</issue>):<fpage>24</fpage>&#x2013;<lpage>44</lpage>. doi:<pub-id pub-id-type="doi">10.3934/aci.2024003</pub-id>.</mixed-citation></ref>
<ref id="ref-50"><label>[50]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fr&#x00E4;nti</surname> <given-names>P</given-names></string-name>, <string-name><surname>Rezaei</surname> <given-names>M</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>Q</given-names></string-name></person-group>. <article-title>Centroid index: cluster level similarity measure</article-title>. <source>Pattern Recognit</source>. <year>2014</year>;<volume>47</volume>(<issue>9</issue>):<fpage>3034</fpage>&#x2013;<lpage>45</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patcog.2014.03.017</pub-id>.</mixed-citation></ref>
</ref-list>
</back></article>