<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>differentiable estim ates of m ean, insensitive to outliers</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Moscow</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Russia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute Mathematics and Informatics</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Applied Mathematics</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Kabardino-Balkarian Scientific Center</institution>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Nalchik</institution>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <fpage>193</fpage>
      <lpage>197</lpage>
      <abstract>
        <p>-The article presents a new approach to the problem of searching for cluster centers, based on minimizing differentiable estimates of the average value, insensitive to outliers. It is at the level of the initial mathematical formulation of the problem to lay the stability of the solution with respect to outliers in the data. The search for cluster centers is carried out using the Mahalanobis distance. The proposed algorithm is based on an iterative reweighting scheme. At each step, the problem of searching for cluster centers based on an algorithm with weights of examples is solved. The weights of the examples correspond to the values of the partial derivatives of a function that estimates the average value and is insensitive to outliers. The weights obtained in this way suppress the effect of emissions.</p>
      </abstract>
      <kwd-group>
        <kwd>Keywords-robust</kwd>
        <kwd>clustering</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Automation RAS</title>
    </sec>
    <sec id="sec-2">
      <title>Automation</title>
    </sec>
    <sec id="sec-3">
      <title>Kabardino-Balkarian Scientific Center RAS</title>
      <p>mean
estimate,
iteratively reweighted algorithm</p>
      <sec id="sec-3-1">
        <title>I. INTRODUCTION The problem of searching for cluster centers has been in the field of attention of researchers for many years [1], [2], [3].</title>
        <p>The classical method for searching for centers and
covariance matrices of clusters can be based on solving the
following minimization problem:
1
 1∗, … ,  ∗ = arg min
 1,…,  
 =1,…,
min  (  ;   ,   )
(1)
matrices,
where  1, … ,   are cluster centers,  1, … ,   are covariance
 ( ;  ,  ) = ln| | + ( −  )′ −1( −  )
is the square of the Mahalanobis distance with the covariance
matrix  between the points  and  .</p>
        <p>This statement of the problem is based on the assumption
that the points of the  -th cluster obey a multidimensional
normal distribution with a density
an arbitrary point  refers to the cluster with the number
1
√| |
 ( ;  ,  ) ∝
 −2( − )′ −1( − ),
 ( ) = arg max  ( ;   ,   ).</p>
        <p>=1,…,</p>
        <p>
          The problem (1) is reduced to solving systems of
equations
Copyright © 2020 for this paper by its authors.
(2)
(
          <xref ref-type="bibr" rid="ref8">3</xref>
          )
1
|  |
∑  
 ∈ 
 ∈ 
∑ (  −   )′(  −   ),
where   ⊂ {1, … ,  }are indices of points falling into the 
th cluster.
k-means algorithm:
        </p>
        <p>
          The following iterative procedure underlies the extended
  , +1 =
1
1
|  , |
|  , |
∑  
 ∈  ,
 ∈  ,
∑ (  −   , )′(  −   , ),
where
where   , are indices of points falling into the  -th cluster at
the  -th step. Initial values of cluster centers  1,0, … ,   ,0 and
covariance matrices  1,0, … ,   ,0 are set before the iteration
procedure (
          <xref ref-type="bibr" rid="ref8">3</xref>
          ).
        </p>
        <p>A significant distortion of the results of the algorithm
may appear if the empirical distribution { ( 1), … ,  (  )},
 ( ) =  ( ;  1, … ,   ;  1, … ,   ) =
min  ( ;   ,   )
 =1,…,
contains oitliers.</p>
        <p>II. THE CLASSIC METHOD OF OVERCOMING THE EFFECTS OF</p>
        <p>OUTLIERS
The classical
method for solving the problem
emissions is based on the replacement of the function
 ( ;  ,  ) with</p>
        <p>( ;  ,  ) = ln| | +  (( −  )′ −1( −  )),
where  ( ) is a function to suppress the effects of outliers. It
corresponds to the probability distribution of points with
density</p>
        <p>1
√| |
 ( ;  ,  ) ∝</p>
        <p>−21 (( − )′ −1( − ))
The optimization task has the form:
 1∗, … ,  ∗ = arg min
 1,…,  
1

∑   (  ),
 =1
(4)
where
  ( ) =   ( ;  1, … ,   ;  1, … ,   ) =
min   ( ;   ,   )
The  function is introduced in order to achieve a relative
decrease in the large values of the square of the Mahalanobis
function. An example is the function  ( ) =  (√ ), where
 is the Huber function:
 ( ) = {

1
2
 2,
−
1
2</p>
        <p>if  ≤ 
 2, if  &lt;  .</p>
        <p>Along with the Huber function, you can also use the
function  ( ) = √ 2 +  2 −  , which, unlike it, has a
continuous 2nd-order derivative.</p>
        <p>The problem (4) can be reduced to solving a system of
equations:
{


 =
 =


1
1


 =
∑  
∑   (  −   )′(  −   ),
 
(5)
matrices  1, … ,   .
be found in [5], [6].
where   =  (  (  )),  ( ) =  ′( ).</p>
        <p>For the solution to be unique, it is necessary that  ′( ) be
non-decreasing. But it follows from this that it is enough to
make outliers of the order
 +1
1 -th part of the set of points in
order to break the robustness of such a
method [4].</p>
        <p>Nevertheless, if the matrices  1, … ,   are given, then the
problem of finding the centers  1, … ,   is robust. The loss of
robustness is precisely connected with the evaluation of the
A fairly comprehensive overview of other methods can</p>
      </sec>
      <sec id="sec-3-2">
        <title>III. THE PRINCIPLE OF MINIMIZING DIFFERENTIABLE</title>
      </sec>
      <sec id="sec-3-3">
        <title>AVERAGES, INSENSITIVE TO OUTLIERS</title>
        <p>In this paper, we propose a new approach based on
replacing
the
arithmetic
mean
in
(1)
with
a robust
differentiable mean estimate of  { 1, … ,   }, which will be
insensitive to outliers. Such a replacement will allow, at the
level of the mathematical formulation of the problem, to lay
the foundation for the stability of the solution of the problem.
This is precisely the novelty of the proposed approach. Since
the empirical distribution of the squares of the distances of
the Mahalanobis from the points to the center of the nearest
cluster may contain outliers, so the arithmetic mean value
turns out to be distorted. As a consequence of this, the
positions of the centers of the clusters may be displaced. The
use of an outliers-insensitive average estimate can avoid
distortion.</p>
        <p>The differentiability of the estimate of the average value,
insensitive
to
outliers,
allows
the
use
of
gradient
minimization algorithms to search for cluster centers.
 1∗, … ,  ∗ and  1∗, … ,  ∗ , minimizing the functional
Thus, in terms of outliers, it is proposed to search for
centers  1∗, … ,  ∗ and the matrices  1∗, … ,  ∗ are the solutions
 =
 =


1
1


∑   (  −   )′(  −   ),  = 1, … ,</p>
        <p>The vector of sample weights  for   =   ∗ and   =   ∗
can also be used as an estimate of the significance of points.
points with the lowest values of the weights.</p>
        <p>Since  1 + ⋯ +</p>
        <p>= 1, the outliers will correspond to the</p>
        <p>Stability with respect to outliers is achieved due to the
fact that the weights of the points corresponding to outliers
are significantly less than the weights of the points that are
not outliers. It is also important that the point weight
decreases as the absolute value of the difference between  ‾ =
∇ { 1, … ,   }and   increases. Such properties are a natural
consequence of the robustness of mean estimates.</p>
      </sec>
      <sec id="sec-3-4">
        <title>IV. OUTLIERS INSENSITIVE AVERAGE ESTIMATES</title>
      </sec>
      <sec id="sec-3-5">
        <title>Such estimates can be constructed in at least two ways. The first method is based on the approximation of the median based on the  -mean [7], [8]:</title>
        <p>=1
  { 1, … ,   }= arg min ∑  (  −  ),
where  is twice differentiable strictly convex function with
a minimum at zero. The  -mean defined in this way has
partial derivatives:
  
where  ‾ =   { 1, … ,   }.</p>
        <p>For example, if you take the function  ( ) = √ 2 +  2 −
 , then for sufficiently small values  &gt; 0, you can get an
approximate and smoothed version of the median. Choosing
a sufficiently small value of  , we can ensure that the value
   /</p>
        <p>is negligible for those values   that are far from
the average value  ‾ .</p>
        <p>Smoothed variant of  -quantile can be built based on the
function</p>
        <p>( ),
(1 −  ) ( ),
  ( ) = {
(
(0+)+ (1 −  ) (0+)), if  = 0
(7)
where  ( ) is a function for smoothed variant of median.</p>
        <p>The second method is based on the use of a censored
arithmetic mean, in which the threshold value is estimated
using a smoothed version of the  -quantile:
if  &gt; 0
if  &lt; 0,

1
     , if   &lt;  ‾ 
     ,
   
if   ≥  ‾  ,</p>
        <p>≥ 0 and
where  is equal to the number of   ≥  ‾  . In both cases</p>
        <p>The third method takes a different approach to censoring
values. Let’s define a truncated version of a quadratic
function:
 
  1
+ ⋯ +
  2 = { 2, if | | &gt;  .</p>
        <p>With its help we define
 ̃ =    { 1, … ,   }=</p>
        <p>=arg min {</p>
        <p>∑
|  − |≤ ‾
(  −  )2 +</p>
        <p>∑
|  − |&gt; ‾
 ‾2},
where  ‾2 =    { 1, … ,   },   = (  −  )2.
calculating  ̃ :</p>
        <p>From the definition we get a recurrence relation for
  +1 =</p>
        <p>∑
|  −  |≤ ‾ ,
(</p>
        <p>+
1
+
     )  
    ,
∑
|  −  |&gt; ‾ ,
       ,
    ,
number of values   : |  −   | &gt;  ‾ , .
where  ‾
     , if |  −  ̃ | ≤  ‾
if |  −  ̃ | &gt;  ‾ ,
and  ‾2 =    { 1, … ,   },   = ( 
of values   : | 
−  ̃ | &gt;  ‾ . Note that</p>
        <p>−  ̃ )2,  is the number

 =1
 ̃ = ∑     ,

∑   = 1.</p>
        <p>=1
rewrited as follow
{


where


1
1


 =</p>
        <p>∑   (  −   )′(  −   ),  = 1, … ,  ,</p>
        <p>To search  1∗, … ,  ∗ and  1∗, … ,  ∗ we apply an iterative
scheme that corresponds to the analog of the Jacobi method
for solving the system of nonlinear equations (6).</p>
        <p>The initial positions of the centers are selected in some
way, for example:
  = ∑   .</p>
        <p>2) Step 1 is repeated until  &lt;  (maximum number of
iterations) or the sequence { (  ,1, … ,   , ;   ,1, … ,   , )}
will not concentrate around its condensation point.</p>
        <p>The sets of point indices  1, … ,   corresponding to the
partition into clusters are found before solving systems of
equations. An additional condition | | = 1 is usually added
to prevent singularity of the covariance matrices. Scale factor
 = | | can then be estimated using the  -estimator [9].</p>
      </sec>
      <sec id="sec-3-6">
        <title>The first equation in the system has the form:</title>
      </sec>
      <sec id="sec-3-7">
        <title>To solve it, you can use the iterative procedure:</title>
        <p>+1 = (1 − ℎ)  + ℎ (  ),
where 0 ≤ ℎ ≤ 1. The second equation has a similar form:
 =  ( ).</p>
        <p>=  ( ).
  +1 = (1 − ℎ)  + ℎ (  ).</p>
        <p>In this situation the system of equations (6) should be</p>
      </sec>
      <sec id="sec-3-8">
        <title>To solve it, you can use a similar iterative procedure:</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>A. IRIS dataset</title>
      <sec id="sec-4-1">
        <title>VI. EXAMPLES</title>
        <p>Consider the relatively simple and classic IRIS dataset (3
classes, 4 attributes, 150 items). Here we use data in
projection on 1st and 2nd principial components. As a rule, it
is used for classification tasks. Here we will try to identify
classes using clustering, using the Mahalanobis distance
instead of Euclidean. Figure 1 shows the results of clustering
using the robust algorithm proposed here and the classical
algorithm. The result of clustering using the robust algorithm
(both using    and    ,  = 0.001,  = 0.96) differs
from the given classification only at 3 points out of 150. The
result of clustering using the classical algorithm differs from
the given classification in no less than 6 points out of 150.
For comparison, the classic kmeans with Euclidean distance
differs from the given classification at 17 points out of 150.
This simple example shows that the application of the
proposed robust approach to clustering based on a realistic
set of features can allow us to construct a partition that
differs slightly from a given classification.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>B. Wine dataset</title>
      <p>Consider another classic WINE dataset (3 classes, 13
attributes, 178 items). As a rule, it is also used for
classification tasks. Here we will also try to identify classes
using clustering, using the Mahalanobis distance instead of
Euclidean. The result of clustering using the robust algorithm
(both using    and    ,  = 0.001,  = 0.97) differs
from the given classification only at 3–4 points out of 178.
The result of clustering using the classical algorithm differs
from the given classification in no less than 6–7 points out of
178. This simple example shows that the application of the
proposed robust approach to clustering based on a realistic
set of features can allow us to construct a partition that
differs slightly from a given classification.</p>
    </sec>
    <sec id="sec-6">
      <title>C. S1–S4 datasets</title>
      <p>Cosider datasets S1–S4 for clustering from . They
contain 5000 points, 15 clusters. In Fig. 2–5 presents the
results of clustering for sets S1–S4, respectively. On each
figure, on the left side there is the result of the robust
algorithm, and on the right side there is the classical one.
During the training, a robust mean estimate was used with
   ,  = 0.001,  = 0.96 − 0.97, ℎ = 0.95. It is easy to
see that the robust algorithm allows one to find more
adequate positions of the centers of clusters and the shape of
the variance matrices.</p>
      <p>In this paper, we considered a new variant of the k-means
algorithm, in which the Mahalanobis distance was used
instead of the Euclidean distance. The proposed new
approach to constructing a robust version of k-means
algorithm with the Mahalanobis distance bases on
minimizing robust differentiable estimates of the mean. Its
fundamental resistance ability to strong distortions in data
was shown compared with the classical k-means algorithm.
This is due to the fact that the robust average estimates used
in the work limit the influence on the search for the position
of the centers of clusters of points that are located at
relatively large distances from them. The differentiability of
the estimate of the average value, insensitive to outliers,
allows the use of gradient minimization algorithms to search
for cluster centers. Differentiability made it possible to
construct an algorithm based on the iterative reweighting
method, so that at each step the centers of the clusters are
searched within the framework of the classical k-means with
sample weights. Taking into account the shape of the
covariance matrix significantly enhance the result. It should
also be noted that the result of the robust algorithm is not
completely stable. However, with a suitable choice of
parameters  and ℎ, it can be achieved that in most starts of
the training procedure, an adequate result can be obtained.</p>
      <sec id="sec-6-1">
        <title>ACKNOWLEDGMENT This work was supported by the RFBR grant No. 18-0100050-a.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>V.V.</given-names>
            <surname>Tatarnikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.A.</given-names>
            <surname>Pestunov</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.B.</given-names>
            <surname>Berikov</surname>
          </string-name>
          , “
          <article-title>Centroid Averaging Algorithm for Building a Cluster Ensemble,” Computer Optics</article-title>
          , vol.
          <volume>41</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>712</fpage>
          -
          <lpage>718</lpage>
          ,
          <year>2017</year>
          . DOI:
          <volume>10</volume>
          .18287/
          <fpage>2412</fpage>
          -6179- 2017-41-5-
          <fpage>712</fpage>
          -718.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>A.K.</given-names>
            <surname>Jain</surname>
          </string-name>
          , “
          <article-title>Data clustering: 50 years beyond K-means</article-title>
          ,
          <source>” Pattern Recognition Letters</source>
          , vol.
          <volume>31</volume>
          , no.
          <issue>8</issue>
          , pp.
          <fpage>651</fpage>
          -
          <lpage>666</lpage>
          ,
          <year>2010</year>
          . DOI:
          <volume>10</volume>
          .1016/ j.patrec.
          <year>2009</year>
          .
          <volume>09</volume>
          .011.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>S.</given-names>
            <surname>Belim</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Kutlunin</surname>
          </string-name>
          , “
          <article-title>Boundary extraction in images using a clustering algorithm,” Computer Optics</article-title>
          , vol.
          <volume>39</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>119</fpage>
          -
          <lpage>124</lpage>
          ,
          <year>2015</year>
          . DOI:
          <volume>10</volume>
          .18287/
          <fpage>0134</fpage>
          -2452-2015-39-1-
          <fpage>119</fpage>
          -124.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>R.A.</given-names>
            <surname>Maronna</surname>
          </string-name>
          , “
          <article-title>Robust M-Estimators of Multivariate Location</article-title>
          and Scatter,” Ann. Statist, vol.
          <volume>4</volume>
          , pp.
          <fpage>51</fpage>
          -
          <lpage>67</lpage>
          ,
          <year>1976</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>P.</given-names>
            <surname>Rousseeuw</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Hubert</surname>
          </string-name>
          , “
          <article-title>High-breakdown estimators of multivariate location and scatter</article-title>
          ,
          <source>” Robustness and Complex Data Structures</source>
          , Springer, pp.
          <fpage>49</fpage>
          -
          <lpage>66</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>R.A.</given-names>
            <surname>Maronna</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.J.</given-names>
            <surname>Yohai</surname>
          </string-name>
          , “
          <article-title>Robust and efficient estimation of multivariate scatter and location</article-title>
          ,” arXiv:
          <fpage>1504</fpage>
          .03389,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Z.M. Shibzukhov</surname>
          </string-name>
          , “
          <article-title>On the principle of empirical risk minimization based on averaging aggregation functions</article-title>
          ,” Dokl. Math., vol.
          <volume>96</volume>
          , no.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          3, pp.
          <fpage>494</fpage>
          -
          <lpage>497</lpage>
          ,
          <year>2017</year>
          . DOI:
          <volume>10</volume>
          .1134/S106456241705026X.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Z.M. Shibzukhov</surname>
            and
            <given-names>M.A.</given-names>
          </string-name>
          <string-name>
            <surname>Kazakov</surname>
          </string-name>
          , “
          <article-title>Clustering based on the principle of finding centers and robust averaging functions of aggregation</article-title>
          ,
          <source>” Journal of Physics: Conference Series</source>
          , vol.
          <volume>1368</volume>
          ,
          <issue>052010</issue>
          ,
          <year>2019</year>
          . DOI:
          <volume>10</volume>
          .1088/
          <fpage>1742</fpage>
          -6596/1368/5/052010 P.L. Davies, “
          <article-title>Asymptotic behavior of S-estimates of multivariate location parameters and dispersion matrices</article-title>
          ,” Ann. Statist, vol.
          <volume>15</volume>
          , pp.
          <fpage>1269</fpage>
          -
          <lpage>1292</lpage>
          ,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>P.</given-names>
            <surname>Fränti</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Sieranoja</surname>
          </string-name>
          , “
          <article-title>K-means properties on six clustering benchmark datasets</article-title>
          ,
          <source>” Applied Intelligence</source>
          , vol.
          <volume>48</volume>
          , no.
          <issue>12</issue>
          , pp.
          <fpage>4743</fpage>
          -
          <lpage>4759</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <article-title>Clustering basic benchmark [Online]</article-title>
          . URL: http://cs.joensuu.fi/sipu/ datasets/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>